As we all know the PHP as a programming language was the object of laughs for years now due to its past although the trend is slowly disappearing; however, there are still many “pro programmers” claiming it is undervalued language. The PHP community itself does not help to change this mind.
Firstly we should know, why?
Reasons have got their source in PHP4 and prior ones. These times it was awful language, useful only when creating small apps. Since version 5 premiere the revolution began, changing PHP in an advantageous programming language, similar to other, most popular ones. Since version 7 it is very mature and stable technology with nothing it can be ashamed of. However, the fame of PHP as a language for mentally limited people stayed till today.
PHP is unbelievable beginner-friendly, so there have always been lots of people using it. Unfortunately, most of them have not cared about patterns and good practices, so concurrently lots of shitty code have been developed.
Clearly, you can make a shitty code in whatever language you use, but you will not find as many examples as in PHP anywhere.
That is the main reason of PHP being evaluated as a language for idiots.
What are the real cons of PHP?
First of all, weak performance and scalability. It is interpreted language developed with the web in mind.
It is not sort of a problem if your application is small – database queries make your app much more ineffective compared to your code.
When it comes to massive apps, the PHP performance sucks. That is why Facebook developed HHVM (in a few words – it compiles PHP to C++, for more information visit http://hhvm.com/).
However, how does it look in practice? Since PHP7 there’s incredible performance growth. A test file mandelbrot.php in version 5.0.5 has finished in 251 seconds, meanwhile, in 7.1 it is just 9.2 seconds.
Zend has got plans for version 8.0 allowing it to compile down to bytecode, just like JVM family languages.
Concluding all these things up, PHP7 is a perfect choice for most web projects (and that is why most of the websites use PHP). If it is not wystarczający, developers can use concurrently more performant languages like Go, Scala or Java. However, it is a rare need.
So what about PHP community?
We are living in times when PHP language becomes a full-qualified one which can’t be ashamed of anything. Yet we are still fighting each other between different PHP frameworks.
Sometimes I do not understand people who cannot just adjust the tool to their needs, help beginners confused by the amount of stuff to learn instead praising their framework of choice and swearing the others.
One of the most undervalued is Laravel.
The other day I joined a PHP community group on Facebook to see discussions, learn, get to know other devs.
So you know what?
Now I am ashamed of this community. The one where I have grown as a programmer is Laravel community. It is gorgeous one; many people are willing to help you with your problems, discuss with you and a lot of other things.
What about PHP community in this group?
One person asked about CodeIgniter – is it still used?
The other one answered that the last version released a month before.
So the third one wrote “Laravel is also modern, but does it mean you should use it? 😂”.
Let’s look at the community on other social media. Someone asked what disadvantages of Laravel are.
Laravel = HIV
It was the very first response. Also, no, it is not a joke, unfortunately.
PHP Developers, why are you doing this for yourself?
There won’t be as fast progress in PHP standards as it could be if we shall be concentrating on fighting, eff and blind each other instead of constructive discussion, teaching each other and helping them to become better devs.
As of Laravel and its community. Maybe it does not follow all of the best practices; perhaps it is not the best choice for large projects.
However, it entirely meets its assumptions. Laravel makes applications development rapid and ease.
Furthermore, you will not meet such a friendly community as Laravel in PHP world, anywhere. Laravel is a perfect example what to aim for when building the society around the tool. Its documentation is clear and always up to date. Even if it is not enough, you have got Laracasts.com. Place where Jeffrey Way does a great job to learn programming newcomers proper ways of web development (not only in Laravel) practices. He is a PHP expert ready to help you with your doubts and to answer your questions.
Speaking of me, I am a developer who wants to improve himself, learn best practices and patterns. I have read a lot about choices and minds of other, more advanced PHP devs and I know that Laravel is not the best choice for large projects.
That is where we come to conclusions. PHP community nowadays is its best advantage as well as disadvantage.
We have got great libraries and frameworks like Symfony, Behat, great architectural concepts like DDD, Hexagonal, Event sourcing.
On the other side, this community often seems to be toxic. There are merely meritorious discussions on what to do, how to do it and why to do it. Most pig-headed people concentrate all of their energy on fight Framework A vs. Framework B.
People fighting each other forget that our task is, usually, to deliver the best application in the shortest possible time.
We should learn how to select the tool that fits our needs at its best. Next “my framework is better” battle won on Facebook will not teach us this ability but the knowledge of its advantages and disadvantages surely will.
We can learn it when our (continuously improved) skills allow us to, not when we read the other hater’s comment somewhere over the internet. Then, we can notice, analyze and know the consequences of every choice we will make.
Making all of your applications with Symfony or Laravel and being such a Facebook fighter is not art. The art begins when you know when you should choose Symfony over Laravel or rather some microframework.
However, people do not understand it, that is why we have so many fights over community instead of meritorious discussions.