I know that I am late to the party by a month, and haven’t spent much time in the PLUG discussion groups over the past few years. Regardless I thought I would weigh in on this conversation.
PHP is a real language and is “Turing complete”. PHP 7 when introduced, could be as much as 2 times faster than Python 3 when it came out. Not sure where they both stand now with speed improvements in Python 3.8 through 3.10. And I have not kept up with PHP in recent years.
Facts – It accounts for as much as 80 percent of the web applications hosted on the internet. It is by far bigger than any other language used on the backend of the web stack. 60 percent of that domain usage is WordPress with Drupal and Joomla being the next dominant PHP based framework used in that stack.
Most of this implementation is non enterprise level, small business, and personal usages. But there are PHP-based enterprise implementations. The world’s largest real estate company’s extranet that controlled thousands of brokerages across 76 countries was written in the PHP Yii framework and operated in that code state for more than 15 years - I extended it and managed it for 2 years. Much of the state and federal government’s intranets are enterprise level implementations based on Drupal, and the symphony PHP framework is an enterprise level PHP system with a vast library that rivals those of Java or .Net
Language preference in programming and software engineering is colored by so many different and competing ideas and dynamics, that it can be hard to differentiate between confirmation bias and real-world experience. I recall a meeting once at a previous employer about managing multithreading in an orchestrator we were writing. We were discussing whether to use Python or Java, and the Java “camp” were claiming that multithreading would be much faster and cleaner in Java. But the Python “camp” was opposed because they could implement the rest of the code requirements in much less time. The VP of software of the firm weighed in (to the disappointment of the Java camp) by saying that both teams could and would most likely implement the multithreading using the C libraries anyway so the Java use claim was really a moot point. My point is that in the enterprise space it is rare for a stack anymore to be implemented or even written in a single language or framework.
PHP – Victim of the Java influenced fanaticism towards OOP
Many languages have fallen victim to the ivory tower
approach to OOP programming that was institutionalized by Java. PHP’s obvious limitations in OOP pre version
5.3 was a crutch for the language and during the 2013 timeframe is when C# out
positioned PHP in new implementations for the first time as referenced on the Tiobe Index. It is my opinion that with PHP version 5.3 it
was finally seen as a fully viable (all-be-it still limited) OOP platform and quelled
C# rise in the index for a little longer.
I feel that it was this focus and the dream to bring PHP up to the
stricter levels of implementation found in Java OOP et ell, where in version 7 we
have the required adherence to declare class method visibility. Add type hinting into the mix and it almost
looks like Java or C#.
The perception that PHP was somehow slow to adopt more strict OOP standards is in
my view an oversimplification and a misunderstanding of PHP’s position in the
industry. As pervasive the boast is that
Java is ubiquitous and “everywhere” its footprint in comparison to PHP on the
web is miniscule. A breaking change caused
by a change in PHP version on the web has at least one order of magnitude more
effect than that in Java. Couple that with
the fact that the change in capabilities between 5.2 to 7 are monumental compared
to the changes in Java during that same time, then the scope of changes in PHP are
nothing short of “mountain moving” without breaking the web.
Microservices have changed the game.
If there is a downside it is that PHP has positioned itself as the king of web-based monolithic frameworks in an age where, at least on the enterprise side microservices are the name of the game. Scale is the key and the ability to break up the monolithic nature of applications into smaller pieces that can scale independent of each other is vital in order to leverage the cost of cloud computing. In my view this is at odds with the PHP based frameworks that are popular now. While they are all scrambling to provide “headless” implementations to allow for more flexibility and to look more “microservice like” it is hard to break up WordPress which is more than half a million lines of code or Drupal which is over a million. Add in containerization (Docker and Kubernetes) and PHP is just not the go to language for quick Implementation in these situations. Go, Python, or Node are going to be the first choice.
The dynamic behind this is that more and more the PHP-based CMS
frameworks will be limited to single person and small business web apps. Even the original LAMP stack now has to contend
with the MEAN and MERN stacks that can be spun up in the cloud in minutes. In the enterprise space where a firm is
literally funneling half a million dollars or more per day into their IT
department to build new applications and manage cloud systems PHP is simply not
a choice. Despite it being a state-of-the-art
OOP language at this point, it is simply not chosen in my view because it positioned
itself to be another Java like implementation (interpreter and runtime
differences aside), and right now lighter weight - limited single generation inheritance or composition based OOP mixed with functional programming are becoming the standard. And while like Python, PHP’s functions are
first class citizens and could be written functionally, languages like Go or Python’s ease of use
and structure are more appealing.
That said, PHP is not going anywhere. While
it has fallen in 7 years from the 5th most popular language to the
10th, most of the backend of the web still runs on it, and it is
fully supported and even contributed to by most of the leading hosting
companies. It is their bread and butter. And really do languages ever really go away? The first computer I had in the 80's ran Cobol and we still have systems today that run Cobol and need programmers to maintain them.
On 2022-08-28 04:55, Steve Litt via PLUG-discuss wrote:
> On Sun, 2022-08-28 at 02:23 -0700, Andrew McRobb via PLUG-discuss
> wrote:
>>
>> It has its place in the ecosystem, there is no way around it, but it's
>> always going to be that language for engineering websites, that's it.
>
> What's wrong with that? I remember LAMP, and having to make all sorts
> of web
> primatives in Perl that PHP just automatically gives you.
>
> SteveT
I did some Perl in 2000. Seems PHP started to dominate somewhere
between 2002 and 2004. Seems a lot of other people liked PHP for some
reason. I know I liked it when I first saw it in 2002.
>
>
> ---------------------------------------------------
> PLUG-discuss mailing list - PLUG-discuss@lists.phxlinux.org
> To subscribe, unsubscribe, or to change your mail settings:
> https://lists.phxlinux.org/mailman/listinfo/plug-discuss
---------------------------------------------------
PLUG-discuss mailing list - PLUG-discuss@lists.phxlinux.org
To subscribe, unsubscribe, or to change your mail settings:
https://lists.phxlinux.org/mailman/listinfo/plug-discuss