They said PHP is dead

PHP in the Modern Web: A Relic or a Resilient Force. Here's my 2 cents.

Midwit PHP/JS

In the ever-evolving landscape of web development, one question often arises: Is PHP dead? Many have been quick to dismiss this classic server-side scripting language, but the truth is far more nuanced.

Why Some Developers Hate PHP

One common criticism of PHP is the perception that it encourages the mixing of HTML and logic, leading to messy and unmaintainable code. In the past, it was not uncommon to find PHP scripts interwoven with HTML, without proper use of classes or separation of concerns. This practice has led to a stereotype that PHP inherently leads to "spaghetti code," even though modern PHP development emphasizes clean architecture and object-oriented principles.

I do agree PHP version < 7.0 sucks, with tons of out dated tutorials online teaching bad practices. So we found the most pissed off developer in the world against PHP: https://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/ in year 2012. It’s cool to hate PHP at that time.

Another reason? WordPress. Yes but I'll stop right here.

The Modern Face of PHP

The major rewrite of the language leads to the release of PHP 7 was the turning point of this language. The outcome PHP 7 has significantly improved performance compared to PHP 5, with applications running up to 2-3 times faster. (Also faster than Python and Ruby)

Also, exciting new features has been added frequently and consistently since PHP 7. The community has been active and come out with https://www.php-fig.org/psr/. Along many other tools created by the community:

You want type safety? We have static analysis tools for strict typing like https://phpstan.org and https://psalm.dev.

You like great developer experience (DX) like Ruby or Rails? Here's a better community driven framework and ecosystem: https://laravel.com and their documentation is the best among all open source projects.

You fancy SPA tools like Hotwire Turbo and Phoenix LiveView? Go try https://livewire.laravel.com.

You think NPM was a mistake? https://getcomposer.org is the best package manager across all programming languages.

You can even create desktop application with https://nativephp.com.

Hear What Others Say

PHP is far from dead. While it may not be the trendiest choice, its resilience and continuous improvement affirm its place in modern web development. Rather than a relic, PHP remains a viable option for many developers, from beginners to veterans.

Aaron Francis, developer educator at PlanetScale has 2 great video content about PHP and Laravel.

PHP is the future
PHP doesn't suck (anymore)

Mohamed Said, a full-stack web developer and was Laravel's first ever employee, flexed some modern PHP code.

Go with PHP - Mohamed Said
If you haven’t seen PHP code in a while, let me show you how it looks like in 2023. PHP has become faster, more secure, and more enjoyable to use. More importantly, development became more active. PHP is now a…

The ReadME Project from GitHub has a featured article about Laravel being the happiest developer community.

Is Laravel the happiest developer community on the planet?
How the PHP framework Laravel prioritizes developer experience by focusing on details and avoiding the hype cycle
Is Laravel the happiest developer community on the planet?

Ready to give it a try?

I recommend Laravel as PHP choice of framework. It has the best tools and ecosystem all supported as first class libraries.

Can you image all these available to help you build app faster?

Quick start: https://bootcamp.laravel.com

Dive in already: https://laracasts.com/series/laravel-8-from-scratch

Subscribe to Jewei.toString()

Don’t miss out on the latest issues. Sign up now to get access to the library of members-only issues.
[email protected]
Subscribe