PHP is a great language, and today we’re breaking down why.
We love PHP at CodeClouds. It’s a powerful, highly extensible language that brings a lot to the table. If you’re building a new startup, it can be an excellent tool that provides you with a lot of powerful functionality; as far as server-side programming languages go, it strikes an excellent balance of power and accessibility that others envy. Today we’re going to be breaking down exactly why we think it’s a good choice for you, and why you should be using it in your startup.
It Has Momentum
It’s a big one, and it’ll inform many of the rest of the points I want to make. PHP is massive, and that makes it a better language to work with. It doesn’t change the nature of the code, but it often changes how you interact with it—it’s easier to find solutions when there are more people looking for them. There are powerful frameworks supported by large and dedicated teams (I love Laravel), there are 1.3 million PHP questions answered on Stack Overflow, there’s always a friend in group chat who has run into the same problem and knows an easy fix.
It’s not going anywhere, either. There’s a stability to PHP that you’re not going to get with smaller languages—if you develop in PHP now, you’re going to have access to developers and support for a long time to come.
The Gripes About Quality are outdated
PHP has got a bad rap, and I’m not sure it’s entirely deserved.
Not any more anyway—PHP4 and PHP5 lacked a lot of core features you want from a solid programming language (wow, was PHP4 type unsafe), but PHP7 has been out for 4-ish years now and by and large it’s done a great job of patching the issues with the language. Not only did PHP7 add scalar type declarations to fix the language’s awful type safety, it added a wide variety of quality of life syntax improvements like finally having a proper null coalescence operator. PHP7 has also shown itself to be twice as fast as 5.6 in certain benchmarks; it is significantly better-optimised, and that’s going to help your startup run smoothly.
PHP7 came out in 2015, but the older versions’ bad reputations have stuck to it and I think it’s important we acknowledge that and start moving forward. PHP8 is nearly here! We’re complaining about a system that doesn’t exist any more, and applying its flaws to the system we do have. Do you complain that Spotify overheats when you leave it in the cassette player, and that the tape keeps coming out? No? It’s equally as silly as complaining about PHP4 flaws in PHP7.
It’s Easy to Learn
PHP is one the fastest and easiest languages to pick up. I think that’s also part of the reason it gets a bad rap: it’s a favorite of newbies and it’s easy to turn up your nose at something that beginners are using. Newbies also make more mistakes and spend more time on Stack Overflow or asking for help from senior devs, and that can paint a picture that PHP is ‘the language with problems’ when really it’s just that the people using it are more likely to be vocal about those problems.
It Has an Incredible Ecosystem
We’re big Laravel fans here at CodeClouds, but I don’t have a single bad word to say about Symfony either. There’s also Zend and Cake and CodeIgniter and half a dozen other great frameworks that let you choose to work in exactly the way you need to. There’s also the big projects written in PHP that you can leverage for your own startup. WordPress and Drupal are the two big obvious ones, but everything from Facebook to Tumblr to Wikipedia is written in PHP. Because PHP is in so much stuff, that means it integrates with a broad variety of other platforms and systems, which makes it extremely extensible.
Attack of the Stacks
Speaking of integrations, PHP has direct connectivity with over 40 database types. You’ve got MySQL of course, but it also works seamlessly with PostGre, Cassandra, MongoDB, and basically any other major database you can think of. It also works with a broad variety of servers. If I started listing stack acronyms we’d be here all day; your LAMPs and your LEMPs and your WAMPs and every other four-letter word ending in P. The point is, you’ve got a huge variety of options and it’s easy to tailor your backend to whatever you need.
PHP has managed to survive since 1994, which in terms of programming languages makes it downright venerable. It managed to survive this long for a reason—even with the issues in some of its earlier versions, the ease of learning and extreme extensibility made it a potent choice for developers looking to build something amazing. It’s having a bit of a renaissance right now, and the team are looking forward to seeing what PHP8 brings. I hope I’ve convinced you of its utility. If you want to go deeper into the PHP rabbithole, check out 10 engaging features of Laravel PHP or our guide to error reporting in PHP7. Codeclouds have a large and experienced team of PHP developers offshore — if you’re looking to outsource your development work, look no further than CodeClouds.