19 Jul 2024

Is PHP still relevant in 2024?

I recently stumbled on the PHP in 100 seconds video from Fireships fantastic 100 second series and a comment by one user gave me a smile and struck a chord. The top comment was: “Finally, the final boss of the 100 seconds series”. That pretty much sums up my thoughts.

Returning to writing code after a long stint in management, I’ve been playing around with various frameworks and languages over the past 12 months, trying to find my feet in a new, largely Javascript dominated world. I’ve dabbled with Nextjs, Nuxtjs, Rails, which I never got to in the past, and even Go for some minor scripting tasks.

I then decided to build my consultancy site using Astro coupled with a headless CMS before I thought, wouldn’t it be simpler if I just used Laravel for this? I already have cloud servers and use PHP on a daily basis building Magento stores so wouldn’t it be more productive to just use what’s tried and tested without these additional services?

That’s not knocking Javascript frameworks and granted, monoliths aren’t necessarily the fashionable choice at the moment, but PHP often gets dismissed within modern developer discussions. Scalability, concurrency, legacy codebases… WordPress. The reality though is that PHP still powers a huge portion of the web and has continued evolving significantly over the years, making it a far stronger language in 2024 than many developers probably realise.

I thought I’d pull together some thoughts on why PHP remains relevant and highlight features and tools specifically from Laravel and Symfony that demonstrate its continued evolution.

1. The Evolution of PHP

PHP, criticised historically for inconsistent syntax and performance issues, has undergone substantial changes over the past decade. The language has evolved significantly through major releases, introducing new features, architectural improvements and performance gains that make it far more competitive with modern languages than many developers still assume.

2. PHP Market Share and Adoption

Despite regular claims that PHP is declining, the language still powers a huge percentage of the web.

PHP remains deeply embedded within modern CMS platforms, ecommerce systems and backend infrastructure through technologies like WordPress, Magento and Laravel-based applications.

According to recent usage statistics, PHP still powers around 77% of websites using a known server-side language. WordPress alone accounts for a massive portion of the web, while platforms like Magento continue underpinning large-scale ecommerce operations globally.

Wikipedia, one of the largest and most visited websites in the world, also continues relying heavily on PHP for its backend infrastructure.

One thing that becomes increasingly obvious working commercially is that PHP never really disappeared. The conversation shifted more towards frontend ecosystems and Javascript frameworks while PHP quietly continued powering a substantial amount of production web infrastructure underneath.

3. Key Improvements

  • Performance Enhancements: PHP 7 brought significant performance improvements with the introduction of the Zend Engine 3.0. PHP 8 has continued this trend, with Just-In-Time (JIT) compilation further improving execution speed. These advancements make PHP applications faster and more efficient.
  • Improved Type System: PHP has gradually introduced scalar type declarations, return type declarations and union types, making it easier to write more robust and maintainable code. The language now offers much stronger support for modern programming practices and design patterns.
  • Error Handling: The introduction of exceptions for error handling has replaced the older error reporting system, making it easier to catch and handle errors in a more consistent and predictable manner.
  • Modern Features: PHP 8 introduced features like named arguments, attributes and match expressions, aligning the language more closely with modern programming paradigms.

Modern PHP applications also benefit from mature tooling around queues, caching, APIs, background processing and cloud deployment workflows, making the ecosystem far more capable than many developers still assume.

4. Laravel

Laravel has emerged as one of the most influential modern PHP frameworks, significantly improving developer experience and helping modernise perceptions around PHP development over the last decade.

It simplifies common tasks such as routing, authentication and caching, allowing developers to focus on building robust applications rather than repeatedly solving infrastructure problems.

Notable Laravel Packages

Filament

Huge shoutout to the Filament team as this package has got a few of my projects off the ground in record time. Filament simplifies the creation of beautiful and interactive admin panels in Laravel applications. It provides a set of components and utilities that make it easy to build complex admin interfaces with minimal effort.

  • Livewire Integration: Filament seamlessly integrates with Livewire, allowing developers to build dynamic interfaces without writing JavaScript.
  • Customisable Components: Filament offers a wide range of customisable components, such as tables, forms and modals, enabling developers to create tailored admin experiences.
  • Resource Management: Filament simplifies resource management with an intuitive API for defining and managing resources, actions and permissions.

Livewire

Livewire is a powerful package that enables developers to build dynamic, reactive interfaces using Laravel’s Blade templates. It eliminates the need for a separate frontend framework, allowing developers to leverage their existing PHP skills.

  • Real-Time Updates: Livewire enables real-time updates to the UI without requiring page reloads, providing a smooth and interactive user experience.
  • Server-Side Rendering: Livewire components are rendered on the server, ensuring fast initial page loads and improved SEO.
  • Declarative Syntax: Livewire’s declarative syntax makes it easy to define interactive behaviour directly in Blade templates, reducing the complexity of JavaScript-heavy applications.

Inertia

Inertia is a package that allows developers to build modern single-page applications using familiar server-side frameworks like Laravel. It acts as a bridge between the server and client, enabling seamless integration of server-side rendering with client-side interactivity.

  • Vue.js Integration: Inertia integrates seamlessly with Vue.js, allowing developers to build rich, interactive interfaces using Vue components.
  • Simplified SPA Development: Inertia eliminates the need for a separate API layer, simplifying the development of SPAs by allowing developers to leverage Laravel’s routing and authentication features.
  • Shared Data: Inertia provides a simple mechanism for sharing data between the server and client, making it easy to manage application state and reduce code duplication.

5. Symfony

Now I have limited commercial experience with Symfony beyond the occasional Magento class error, but it remains another hugely popular and powerful PHP framework, particularly within enterprise environments due to its flexibility and scalability.

Symfony provides a robust set of components and tools that can be used independently or as part of a larger framework, which is one of the reasons it continues seeing widespread enterprise adoption.

Notable Symfony packages

API Platform

API Platform is a powerful tool for building RESTful APIs with Symfony. It provides a set of features and tools that simplify the development and management of APIs, allowing developers to focus on delivering robust and scalable solutions.

  • Automatic CRUD Generation: API Platform can automatically generate CRUD operations based on your data model, reducing the need for boilerplate code.
  • GraphQL Support: API Platform supports both REST and GraphQL, allowing developers to choose the most suitable API style for their applications.
  • Extensible and Customisable: API Platform is highly extensible, enabling developers to customise serialisation, validation and security to meet specific requirements.

EasyAdmin

EasyAdmin is a powerful package for building admin panels with Symfony. It provides a simple and intuitive interface for managing data, making it easy to create and customise admin interfaces.

  • Configurable Dashboards: EasyAdmin allows developers to create custom dashboards with widgets and charts, providing insights into application data.
  • Flexible Form Configuration: EasyAdmin offers a flexible form configuration system, allowing developers to customise the layout and behaviour of forms in the admin panel.
  • Role-Based Access Control: EasyAdmin supports role-based access control, enabling developers to define and manage permissions for different user roles.

Doctrine ORM

Doctrine ORM is a powerful object-relational mapping tool that integrates seamlessly with Symfony. It provides a robust and flexible approach to managing database interactions, allowing developers to focus on application logic.

  • Advanced Query Capabilities: Doctrine ORM provides a powerful query builder and support for advanced query techniques, enabling developers to retrieve and manipulate data efficiently.
  • Database Migrations: Doctrine ORM includes a robust migration system, making it easy to manage database schema changes and ensure consistency across environments.
  • Entity Lifecycle Management: Doctrine ORM provides features for managing entity lifecycle events, allowing developers to implement custom logic at various stages of the entity lifecycle.

6. Final thoughts

From an operational perspective, PHP remains one of the most commercially important languages on the web. It continues underpinning enormous portions of CMS infrastructure, ecommerce platforms and custom application development globally.

The PHP ecosystem also continues evolving rapidly, with ongoing improvements around performance, security and developer experience helping modern PHP feel very different from the language many developers remember from 10 or 15 years ago.

PHP’s vibrant community and extensive ecosystem of libraries and frameworks contribute heavily to its continued relevance. The active development of frameworks like Laravel and Symfony, alongside a wealth of third-party packages, ensures that PHP remains adaptable to changing industry trends and developer needs.

PHP’s transformation over the years has made it a strong contender in the modern web development landscape. With frameworks like Laravel and Symfony, PHP offers a powerful and flexible platform for building robust applications while still benefiting from one of the largest ecosystems in web development.

As a developer returning to PHP, you’ll find a language that has matured significantly, offering new opportunities and possibilities for building modern web applications.

I’m an ecommerce consultant specialising in PHP frameworks like Magento and Laravel, helping retailers build and optimise scalable, high-performance applications. If you need help planning a new build or improving an existing site, get in touch to see how I can support your project.

Related Articles

Ryan Findlay Ecommerce Consultant

Posted by Ryan Findlay

Ecommerce Consultant

An ex-senior manager in the Shopify and Magento agency space, I've spent over 10 years working closely with retailers to deliver full end-to-end technical solutions across a range of industries.

I now run an independent ecommerce consultancy with my partner where I look after consultancy, performance and management of technical work.

Get in touch Get in touch