Is PHP the new JS?



AI Summary

This video explores the idea that “PHP is the new JavaScript” as discussed in a Mux blog article by Dave. Theo examines PHP’s journey from being widely disliked to gaining renewed interest, particularly through Laravel’s success and recent $57M investment.

Key Points:

PHP’s Dark Past:

  • PHP had a terrible reputation due to poor performance, lack of guardrails, and inconsistent design
  • WordPress deployments via FTP were common and often led to security issues
  • Performance was abysmal - PHP 5.6 averaged 475ms response times vs 164ms in PHP 8.0
  • Facebook had to create “Hack” language to work around PHP’s limitations

The JavaScript Era:

  • Node.js revolutionized server-side development by allowing JavaScript everywhere
  • This led to framework fatigue (Ember, Angular, Backbone, Meteor, etc.)
  • React eventually emerged as the solution that brought stability

Laravel’s Rise:

  • Created by Taylor Otwell starting in 2011
  • Provides first-class support for common web app needs (Stripe via Cashier, feature flags via Pennant, social auth via Socialite)
  • These are official framework features, not community packages
  • Offers a “batteries included” approach that eliminates decision fatigue

Modern PHP Improvements:

  • Massive performance gains: 10x faster from PHP 4.0 to modern versions
  • PHP 8.x series brought significant speed improvements
  • Better tooling and ecosystem maturity

Key Takeaway:
While JavaScript frameworks offer flexibility and innovation through community-driven solutions (like React Query/TanStack Query), Laravel provides stability and comprehensive built-in solutions. For developers tired of choice paralysis in the JavaScript ecosystem, Laravel offers a mature, well-integrated alternative that makes PHP development enjoyable again.

Theo concludes by expressing excitement to try Laravel himself, suggesting the framework has successfully rehabilitated PHP’s reputation in the modern web development landscape.