Is PHP Still Relevant? Exploring the Data Behind Its Popularity
Written on
Chapter 1: Understanding PHP's Declining Popularity
In the world of programming, many are aware that PHP's prominence has dwindled significantly from its peak, losing traction to emerging technologies. But just how severe is this decline, and should one still consider learning PHP? To address this question, I've analyzed data from StackOverflow and GitHub, creating various visualizations to illustrate current trends. Let’s delve into the details.
Section 1.1: Trends in PHP Usage
Every year, StackOverflow conducts a survey querying developers globally about their programming experiences. Two key questions provide insight into our discussion:
- Which programming, scripting, and markup languages have you extensively worked with over the past year?
- Which languages do you aspire to work with in the next year?
By examining responses from developers worldwide and specifically from the United States—where technological advancements are often adopted first—we can gain a clearer perspective on PHP's trajectory.
Here are the statistics showcasing the percentage of developers globally who have engaged deeply with PHP.
As anticipated, a distinct decline is observable year after year. Moreover, the disparity between developers currently working with PHP and those who wish to use it is concerning. In contrast, rising languages like Rust display a reverse trend; nearly 38% of survey participants express a desire to work with Rust, while only 16% have experience with it.
The data from the United States mirrors this trend, albeit with slightly lower figures.
While StackOverflow provides valuable insights, it's evident that PHP's popularity has consistently declined over the last five years. Given the widening gap between current and desired usage, this downward trend is likely to persist.
Section 1.2: PHP Developer Salaries
The StackOverflow survey also inquires about developer salaries, allowing us to compare PHP salaries with those of other languages. For this analysis, I've focused solely on data from the United States to ensure relevance.
Here’s a chart illustrating the median salaries across various programming languages, with percentages indicating the ratio of PHP salaries relative to others.
Although there's an observable increase in salaries overall, PHP developer salaries have experienced a decline in comparison to other languages. While salary data can be unreliable, this graph provides a rough perspective.
Chapter 2: Analyzing GitHub Trends
To gather additional insights, I examined the programming languages utilized in GitHub repositories boasting over 10,000 stars. The following chart displays the percentage of repositories employing different languages, with the total byte size represented on the x-axis.
PHP and Rust appear closely aligned in this comparison. However, the landscape shifts dramatically when analyzing repositories created after 2020.
In this scenario, PHP is nearly absent, while Rust demonstrates significant growth in both metrics. Although Rust is a newer language, it’s notable that recent popular repositories largely overlook PHP.
Section 2.1: Conclusion
Currently, approximately 18% of developers still utilize PHP in their work, according to StackOverflow. Despite its decreasing relevance, PHP is unlikely to vanish in the near future. However, the evidence suggests that aspiring developers may be better served by learning a language with a more promising outlook.
While many developers continue to appreciate PHP and its ongoing improvements, if I were to wager, I would steer clear of PHP for my professional development.
Thank you for reading, and I look forward to our next discussion! :)
In the first video, "Would I Still Use PHP in 2024?", the presenter explores the relevance of PHP in the current programming landscape and its potential future.
The second video, "PHP is STILL KING!", discusses the enduring aspects of PHP and its role in the programming world, challenging the notion of its decline.