Why PHP is a perfectly reasonable enterprise solution

By choosing php a startup will have a smaller barrier of entry thanks to lower fixed costs - costs of infrastructure, in additio

*Disclaimer - Things wil be said that might make your blood boil, best read after third beer when you just stop caring

 

Recently I read an interesting article about HDD - Hype driven development, that prompted me to touch on this subject but from a different angle.

As well as a question I stumbled upon on Quora "Will PHP die out in 2017?". They just keep asking it over and over again, only the year at the end changes...

via GIPHY

Yes, PHP is a real programming language, don't even try

This argument died with nineties, as well as MTV, nothing more needs to be said. Next time I hear this from someone I'm going to bitchslap them for dramatic effect, unless it's my boss, then I will divert the anger inwards and grow an ulcer.

No, it will not die this year nor the next one 

Mayor CMS and eCommerce platforms are written in PHP and milions of businesses rely on them, changing the platform/language would increase their costs exponentially (rewriting custom code, education of employees, letting off and recruiting and training new employees, server changes, etc.). Even if we would reduce php only to Wordpress that would still be milions of websites.

  • Mature and established frameworks with strong communities Symphony, Laravel, CakePHP, Zend
  • Laravel has rekindled the interest in php and disrupted the status quo in the php community, it's economics 101, competition drives progress, just look at changes that Symphony 4 brings, whether Fabien Potencier would admit it or not, they are no doubt in part inspired by Laravel
  • Multithreading via pthreads
  • For event driven non-blocking I/O we can use ReactPHP
  • Ratchet for socket communication

 

Now, let's get back on topic, why as a business it is perfectly reasonable to choose php as your language.

Contrary to popular belief that Javascript is the next big thing, the future of the web, you needn't bother learning another language anymore, I'd argue that php is going to have as big a role if not maybe even bigger. Let's discuss why!

Php 7.0 brought us some mayor changes, the performance of php has been increased up to 50% from the previous versions, memory consumption has been decreased significantly and we have type hinting/declarations now, which enables us to catch errors earlier and have a more reliable and maintainable code. I can't even imagine the changes that php 8.0 will bring, who knows, maybe they will even tackle the "share nothing" architecture of php.

Now let's compare this to other popular web languages. Aside from nodejsphp has been faster than both ruby and python since version 5.6, at this point they're miles behind eating the dust and even more interestingly php has the smallest memory footprint of them all.

What does that mean from a business perspective? 

By choosing php as it's language a startup will have a smaller barrier of entry thanks to lower fixed costs - costs of infrastructure, in addition high availability of php developers(manpower) will further reduce costs. This is of crucial importance in the most vulnerable days of a startup.

Let's simplify it, if we have an idea, and we want to start a business, we can find a VPS or a dedicated server that could handle X amounts of requests for less money and less hassle then if we would have chosen nodejs, ruby or python for the same X amount of requests.

Php cannot scale

WRONG! At a certain point, all scripting languages hit a treshold and heavy duty work needs to be handled by compiled languages, and ultimately we need to wake up good ol' C.

I'd argue that you can scale more with php for less money than with any other scripting language just by choosing Phalcon (high performance MVC framework written as a C extension) your server load will reduce dramatically

 

*Now I'd be saying if you like or dislike this article feel free to comment, but since I still haven't finished the comment section, write your thoughts on a piece of paper and come back in a month or so ;) 

 

**Ups, I forgot to update my bad, you can comment now, it actually works haha :D

Last updated: 1 year ago 1618