Why Modern PHP Is Worth Your Attention in 2019 and Beyond
This article reviews PHP's recent evolution—faster runtimes, a thriving ecosystem, modern language features, and improved tooling—while acknowledging lingering design quirks, to help developers decide whether PHP remains a viable choice for contemporary web development.
Programming language debates have never stopped. PHP, often sarcastically dubbed “the world’s best programming language,” is easy to pick up but suffers from inconsistent function naming, lack of native async networking, and maintenance difficulties. After many years of development, does it still have many flaws?
Several years ago a notorious blog post titled “PHP: a fractal of bad design” made the author consider abandoning programming. After switching jobs and witnessing PHP’s progress since version 5.*, the author now shares personal insights for those still using or avoiding PHP.
Today’s PHP still has some questionable designs, just like any language has its quirks. Core function signatures remain inconsistent, configuration settings are chaotic, and many developers still write awkward PHP code because they have to or lack better practices.
The focus here is on the bright side of modern PHP—what has changed and how to write clean, maintainable code.
History Summary
PHP follows a roughly yearly release cycle. At the time of writing, PHP 7.3 is current, with 7.4 expected by the end of 2019 and 8.0 following thereafter. Since the late 5.* era, the core team has maintained a two‑year active support window plus one year of security‑only updates, encouraging frequent upgrades.
For the latest release schedule, see the official PHP supported versions page.
PHP Performance
Performance in the PHP 5.* era was modest, but the rewrite for PHP 7.0 boosted speed by two to three times. Benchmarks from sources such as Kinsta show that modern PHP can rival or surpass other web frameworks in many cases.
While PHP frameworks won’t outpace C or Rust, they are generally faster than Rails or Django and comparable to ExpressJS.
Frameworks and Ecosystem
PHP is no longer just WordPress. The two dominant modern web frameworks are Symfony and Laravel, with smaller options like Zend, Yii, CakePHP, and CodeIgniter. Both major frameworks sit atop a massive ecosystem of packages, ranging from admin panels and CRMs to queue managers and payment integrations.
Packagist, the primary PHP package repository, now sees about 25 million daily downloads, indicating rapid growth. A chart (shown below) illustrates the exponential increase in package and version counts over time.
Asynchronous frameworks such as Swoole, Amp, and ReactPHP have emerged, enabling true async PHP programming and expanding the language’s applicability to I/O‑heavy applications.
The PHP Language Itself
Although async/await is not yet available, PHP has added many modern features:
Short closures
Null coalescing operator
Traits for code reuse
Typed properties
Spread operator
JIT compiler
Foreign Function Interface (FFI)
Anonymous classes
Return type declarations
Modern cryptography libraries (libsodium)
Generators
Numerous other enhancements
These features are proposed, discussed, and voted on by an active core volunteer team and the broader community via RFCs and mailing lists.
Tools
Static analysis tools like Psalm, Phan, and PHPStan have matured, offering TypeScript‑like type checking for PHP code. While PHP lacks a native transpiler, projects such as “Pre” experiment with extending PHP syntax.
Conclusion
Despite its legacy baggage, PHP can be a reliable, maintainable, and high‑quality choice for web development when used correctly. Many developers, including the author, find it a solid option for building robust applications.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
21CTO
21CTO (21CTO.com) offers developers community, training, and services, making it your go‑to learning and service platform.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
