Is PHP going to die?

  • (6 Pages)
  • +
  • 1
  • 2
  • 3
  • Last »

87 Replies - 9706 Views - Last Post: 22 March 2017 - 11:17 PM

#1 MajorZero  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 22-March 16

Is PHP going to die?

Posted 22 March 2016 - 11:11 PM

Hi everyone,
this is my first post. And as a new developer just starting out and learning all the basic skills I was wondering: is PHP a language that will soon die?
I have a decent knowledge of both PHP and Javascript, and I see that the wall between client and server side scripting is getting demolished by js implementing server side scripting elements and ajax tricks too.
So I would like your opinion about this; is it still worth learning and using PHP or would it be better to focus on the latest js frameworks?

Please let me know what your thoughts are.


MjZ

Is This A Good Question/Topic? 0
  • +

Replies To: Is PHP going to die?

#2 Martyr2  Icon User is offline

  • Programming Theoretician
  • member icon

Reputation: 5061
  • View blog
  • Posts: 13,657
  • Joined: 18-April 07

Re: Is PHP going to die?

Posted 22 March 2016 - 11:22 PM

It is said that PHP currently runs as much as 50% of the world's websites. So you tell me if it will die or not.

Some of the biggest open source projects rely on PHP including Joomla, Wordpress, Drupal, Facebook and others. Other frameworks also are built on top of it including Laravel.

PHP just came out with PHP 7 and is pretty fast and fixes many of the things that most people hated about PHP.


So in short, no it is not going to die soon.

Also learning PHP vs JS is like comparing apples and oranges. PHP focuses mainly on the server side and JS on the client side (mostly). I suggest you learn both as both would be of great use to you.

This post has been edited by Martyr2: 22 March 2016 - 11:23 PM

Was This Post Helpful? 1
  • +
  • -

#3 MajorZero  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 22-March 16

Re: Is PHP going to die?

Posted 23 March 2016 - 07:18 AM

View PostMartyr2, on 22 March 2016 - 11:22 PM, said:

It is said that PHP currently runs as much as 50% of the world's websites. So you tell me if it will die or not.

Some of the biggest open source projects rely on PHP including Joomla, Wordpress, Drupal, Facebook and others. Other frameworks also are built on top of it including Laravel.

PHP just came out with PHP 7 and is pretty fast and fixes many of the things that most people hated about PHP.


So in short, no it is not going to die soon.

Also learning PHP vs JS is like comparing apples and oranges. PHP focuses mainly on the server side and JS on the client side (mostly). I suggest you learn both as both would be of great use to you.


Well, I understand what you say and it makes me feel much better to know that PHP is not going to leave us soon.
My observation was more of a feeling in the guts rather than a researched analysis, I admit that. Mostly I was influenced by the success of Node.js, as far as I understood is javascript for the server side scripting. And it also seems to give better performances than PHP. Now, I am not sure if this is the only js framework usable on the server side but sure it seems to me a good competitor for PHP, isn't it?
Also the idea of having to learn only one language may be more appealing to future generations of developers...
The fact that today there are plenty of websites based on PHP... I mean, how fast things change in the world of technology? It takes maybe one or two of these big brands you mentioned to set a new trend and the rest will follow after, so I just think that this is not a good insurance policy for PHP.
But yea I hope I wrong tho... :)

Thank you for you reply!


MjZ
Was This Post Helpful? 0
  • +
  • -

#4 no2pencil  Icon User is offline

  • Professor Snuggly Pants
  • member icon

Reputation: 6544
  • View blog
  • Posts: 30,650
  • Joined: 10-May 07

Re: Is PHP going to die?

Posted 23 March 2016 - 07:47 AM

** Moved from Javascript to PHP Discussion **
Was This Post Helpful? 0
  • +
  • -

#5 astonecipher  Icon User is offline

  • Too busy for this
  • member icon

Reputation: 2329
  • View blog
  • Posts: 9,356
  • Joined: 03-December 12

Re: Is PHP going to die?

Posted 23 March 2016 - 09:34 AM

I don't care how fast things move in the tech sector. Know how to write COBOL? A long dead language, that is still in HEAVY use. What do you think happens when a company spends 2 million on an application and a decade later no one uses the language? They don't start over from scratch, it still has to be maintained, cause it works just fine.
Was This Post Helpful? 2
  • +
  • -

#6 e_i_pi  Icon User is offline

  • = -1
  • member icon

Reputation: 879
  • View blog
  • Posts: 1,893
  • Joined: 30-January 09

Re: Is PHP going to die?

Posted 23 March 2016 - 05:25 PM

PHP, for all the criticism it gets, has a lot of things going for it that will mean it has a long lifetime:
  • The learning curve is very gentle
  • It is a very forgiving language when it comes to writing "bad" code (the only language I've seen that is more forgiving is HTML, which browsers parse regardless of how crap it is)
  • It's free, and will likely always be free
  • There is a large online community at DIC and various other coding forums / sites
  • The take-up is currently at over 50%, if the sites on the internet are used as the measure
  • Extremely popular platforms and frameworks are built on PHP, and so the language enjoys support by proxy through these (e.g. Joomla, Wordpress, MediaWiki)
  • It is under active development (again, finally), with the latest enhancements resolving a lot of the issues that .NET diehards moan/moaned about
  • It is extremely stable due to the fact that it fires up a new instance per session / call. i.e. it doesn't suffer from insidious problems like memory leaks, missing mutexs, etc.

And as astonecipher said, even when a language "dies", it is still in use for decades afterwards. My last workplace had an application written in the 80s that used flat files as the database. There was a weekly scheduled task that preened, cleaned, and conditioned those files in 7 distinct steps so that they could be migrated over to SQL Server. Same workplace, there was another application where the "code" files were written in a pseudo-language, stored in the database, and then read in and compiled during deployment. Due to the fact that the database was DB2 and the field was defined as VARCHAR, your code had to fit in 32KB. If it didn't, you daisy-chained code via method calls. Last time I had to do something like this, I was coding in BASIC on a C64...
Was This Post Helpful? 0
  • +
  • -

#7 jon.kiparsky  Icon User is offline

  • Screw Trump (before he screws you)
  • member icon


Reputation: 10625
  • View blog
  • Posts: 18,185
  • Joined: 19-March 11

Re: Is PHP going to die?

Posted 23 March 2016 - 09:08 PM

Quote

And as astonecipher said, even when a language "dies", it is still in use for decades afterwards


This is true, and this is the current state of PHP. It's dead as a doornail, it's just taking a long time to fall over.

Career-wise there is no point at all in focusing on PHP unless you think you would enjoy maintaining existing systems until their replacements are finished. Companies investing in new systems are not going to invest in PHP, and companies maintaining PHP are doing it because they haven't got around to replacing it yet.

There's a ton of existing PHP code, true enough. That's because for many years it was the only alternative to perl, so people used it. Now there are alternatives, and nobody is going to be looking back. I wouldn't rely on the "people still maintain COBOL" argument, either. COBOL systems do fierce, furious backend processing that is very hard and very expensive to replace. PHP talks to databases and spits out HTML. It's easy to replace, and people replace it regularly. In fact the two projects I work on these days, day job and side project, are both django replacements for older PHP systems. In both cases, it was decided that it was more economical to burn the existing system to the ground and start over from scratch than to continue to struggle on with the existing one. This is what PHP is like now.

The other thing to realize is that companies with deeper, more intensive investment in PHP - and I know of one such - are in a real bind because it's nearly impossible to find programmers who are good enough to wrangle the inherent code debt that comes with working in that language, and who also are willing to take on that job. It's a simple fact: while PHP is easy to learn at the "PHP for Dummies" stage, for any real-world code, any programmer at any level will be much more productive in a real language. And programmers who are any good at all do not like to work in languages that make them less productive. So what this means is, if you're looking to build some sort of system, PHP presents you with a double-barreled shotgun of suck. On the one hand, you are working in a language that will make your programmers less effective, which means you're bleeding money that way. And then you're filtering out the programmers who are capable of really delivering great code.
People who invest in systems are not ignorant of these things. They're not going to sink their money in PHP.


Quote

It is under active development (again, finally), with the latest enhancements resolving a lot of the issues that .NET diehards moan/moaned about


I don't think there's anything you can do about PHP that would fix the language. It's broken at the very bottom. Certainly you couldn't make a backwards-compatible revision of the language that wouldn't hold all of the fundamental flaws. For example, what would you do about the idea of inlining PHP code in HTML pages? It's the single worst idea in PHP, it's responsible for so much of the horror, and trying to get rid of it would literally break all existing PHP sites. The broken truthiness model, similarly, is a prolific source of boobytraps, but those ideas are so deep in the language that you're going to break core logic on every page if you try to fix it.

A non-compatible revision might be considered, but that would throw away the only argument that people have for claiming the language still has a pulse. If you're going to have to rewrite the existing site anyway, you're going to evaluate your options, and in an open market the PHP reboot has literally nothing going for it, so the non-compatible approach is a dead letter.

No, I'm sorry, it's not going to happen. PHP is going to suck until it dies, and it will be a long time in dying, but there's no reason for you to die with it, nor to chain yourself to its rotting corpse.

Because - and this is the positive side of all this - we really do have good options now. If you want to write for the web, django and rails are very popular and not difficult to learn. I also see a lot of people using flask, which is a more lightweight framework on python, and I understand that sinatra is a popular alternative on the ruby side. If you want to get more esoteric, you can pick any language that you want to work in and hunt around for a little while. You'll find some web framework for it, and probably a community of people who swear by it.
If you're more of a javascript fan, I run into a lot of people who are working in node.js and tell me that it's a very good way to write for the web, so that's a very good option for you to consider.

Honestly, PHP is not coming back. The end has come and gone and now it's time to move on.
Was This Post Helpful? 0
  • +
  • -

#8 e_i_pi  Icon User is offline

  • = -1
  • member icon

Reputation: 879
  • View blog
  • Posts: 1,893
  • Joined: 30-January 09

Re: Is PHP going to die?

Posted 23 March 2016 - 10:07 PM

*
POPULAR

Tut tut, such a negative nancy! You entire approach to this is "PHP is old, PHP is in the past, PHP is over" - it's almost like you're trying to convince yourself that it's dead and buried, when it clearly is not.

View Postjon.kiparsky, on 24 March 2016 - 02:08 PM, said:

Career-wise there is no point at all in focusing on PHP unless you think you would enjoy maintaining existing systems until their replacements are finished. Companies investing in new systems are not going to invest in PHP, and companies maintaining PHP are doing it because they haven't got around to replacing it yet.

To entertain your argument, this is called progress, which involves two locations - where you have been and where you're going - which implies that PHP is very much alive. If it were dead, there wouldn't be companies transitioning away from it. I might add that PHP is not the only technology that companies transition away from. All technologies are dumped at some stage. My old workplace is moving away from DB2 and .NET, and had previously moved away from SSRS. Does this mean they are all in the bin? Unlikely.

Quote

PHP talks to databases and spits out HTML. It's easy to replace, and people replace it regularly. In fact the two projects I work on these days, day job and side project, are both django replacements for older PHP systems. In both cases, it was decided that it was more economical to burn the existing system to the ground and start over from scratch than to continue to struggle on with the existing one. This is what PHP is like now.

What framework and design patterns were used in that PHP? I'm guessing they are old and/or bad. What would happen if you applied the same approach to your Django code? It would remain impenetrable to change, or would be deemed replaceable? PHP being easy to pick up means that a lot of **** code is out there. I know this, I'm currently doing exactly what you're doing, except I'm replacing existing PHP with rewritten PHP. I have seen similarly bad code in .NET as well - it is not the language, it's the developer.

Quote

The other thing to realize is that companies with deeper, more intensive investment in PHP - and I know of one such - are in a real bind because it's nearly impossible to find programmers who are good enough to wrangle the inherent code debt that comes with working in that language, and who also are willing to take on that job.

Hogwash. At least in Australia that's hogwash. The competition for PHP jobs here is intense, and I was extremely lucky to get the one I have now. Maybe it's different in USA or Europe, but I doubt it.

Quote

It's a simple fact: while PHP is easy to learn at the "PHP for Dummies" stage, for any real-world code, any programmer at any level will be much more productive in a real language. And programmers who are any good at all do not like to work in languages that make them less productive. So what this means is, if you're looking to build some sort of system, PHP presents you with a double-barreled shotgun of suck. On the one hand, you are working in a language that will make your programmers less effective, which means you're bleeding money that way. And then you're filtering out the programmers who are capable of really delivering great code.

There's a lot of subtext and inference in here. Less productive in PHP? Unlikely depending on your approach. I have worked in .NET, VBA, C#, PHP and Javascript, and found that productivity comes down to how well I know the language and how well I establish my framework / inheritance / models / handlers / etc. My productivity in PHP is better than any other language except maybe SQL, and that it because I have honed my skills over many years and learnt how to implement fundamentally "good" design patterns that transcend language. I look at other people's code and groan - not because it is PHP, but because they wrote without design, because they misinterpreted or ignored SOLID / MVC / DRY / etc, because their approach was driven by deadlines rather than by ease of future maintenance. This I have seen across the board in every language I have written in.

Quote

People who invest in systems are not ignorant of these things. They're not going to sink their money in PHP.

Hold on a sec - the people with the cash are generally, IMO, clueless. Not all, but many. The amount of tremendously bad decisions made by people who have a few mill to throw around without any consequence is astonishing. Plus, you'll find that for the most part, the higher someone climbs the ladder without IT experience, and I'm talking career managers here, the more out of touch they become with what IT entails. My previous senior manager was one of these people - a perennial ladder climber, whose favourite catch phrase was (and I'm not ***ting you) "We have to be more Agile, we have to DevOps!". That fool decided to spend $2M on a system that I and several others advised was rubbish. 2 months after the system was purchased, it was slated for decommission. So, when you say "people who invest in systems are not ignorant of these things", I beg to differ. From every single job I've had, I could lay out half a dozen critically bad decisions that cost clientele or 6 or more figures in hard cash.

Quote

I don't think there's anything you can do about PHP that would fix the language. It's broken at the very bottom. Certainly you couldn't make a backwards-compatible revision of the language that wouldn't hold all of the fundamental flaws. For example, what would you do about the idea of inlining PHP code in HTML pages? It's the single worst idea in PHP, it's responsible for so much of the horror, and trying to get rid of it would literally break all existing PHP sites.

Ahem...

ASP said:

<html>
<body>
<% Response.Write "<h1>Hello World!</h1>" %>
</body>
</html>


Rails said:

<% provide(:helloworld, "Hello World!") %>
<html>
<body>
<h1><%= yield(:helloworld) %></h1>
</body>
</html>


Django said:

<html>
<body>
<h1>{{ hello.world }}</h1>
</body>
</html>



Happy Easter Jon, be thankful there are terrible coders out there keeping the good coders in a job, albeit with ad infinitum rewrites and replacements :)
Was This Post Helpful? 6
  • +
  • -

#9 jon.kiparsky  Icon User is offline

  • Screw Trump (before he screws you)
  • member icon


Reputation: 10625
  • View blog
  • Posts: 18,185
  • Joined: 19-March 11

Re: Is PHP going to die?

Posted 23 March 2016 - 10:30 PM

+1 for a spirited argument.
However, you're still wrong.

Taking your last point first - yes, django templates allow some logic. And yes, this is a mistake. However, there is a massive difference between "our template language allows some branching and selection" and "you can embed our language in the display template". PHP simply does it wrong: in PHP, it's almost impossible to achieve separation of concerns, while django and ruby grugdingly allow some violations of separation of concerns. True, they shouldn't allow those violations, but there's a massive difference there.


And then following on in random order:

Quote

it's almost like you're trying to convince yourself that it's dead and buried, when it clearly is not.


Hereabouts, it's dead as any doornail. The last time I was looking for work, about a year ago, there was one company looking for a PHP engineer, and they were selling custom T-shirts. Everyone with a serious business model was looking at a serious language.

Quote

Hold on a sec - the people with the cash are generally, IMO, clueless. Not all, but many


Okay, point taken. People might still invest in PHP because they're idiots. I'll go along with that. Here in Boston, they're mostly not idiots, and they don't invest in PHP.


Quote

Less productive in PHP? Unlikely depending on your approach...I look at other people's code and groan - not because it is PHP, but because they wrote without design, because they misinterpreted or ignored SOLID / MVC / DRY / etc


Each of these failure comes baked into PHP by design. For example, inlining PHP produces WET code, by design. That's what it's there for. MVC? No, not going to happen in PHP. PHP's model is "compute a little, emit a little". That's just the way it is. It's broken by design.

Quote

If it were dead, there wouldn't be companies transitioning away from it.


If it weren't dead, there would be some companies building new products in it. This is not what I'm seeing here in Boston. Maybe the news hasn't hit in Australia, but "PHP" and "greenfields" are not words that go together well in my part of the world.

Quote

I might add that PHP is not the only technology that companies transition away from. All technologies are dumped at some stage. My old workplace is moving away from DB2 and .NET, and had previously moved away from SSRS. Does this mean they are all in the bin? Unlikely.


Actually, the only sector that I see investing in .NET is the financial sector. Everyone else is going with open and supported technology. Just sayin'.

Quote

Happy Easter Jon, be thankful there are terrible coders out there keeping the good coders in a job, albeit with ad infinitum rewrites and replacements


Those guys are the people who did the last round of work on my current codebase, before I got there. We all fantasize about chucking them out a window.
Was This Post Helpful? 0
  • +
  • -

#10 Martyr2  Icon User is offline

  • Programming Theoretician
  • member icon

Reputation: 5061
  • View blog
  • Posts: 13,657
  • Joined: 18-April 07

Re: Is PHP going to die?

Posted 23 March 2016 - 10:31 PM

I will have to strongly disagree that PHP is dead as a doornail. Again, as I stated earlier it is running a majority of the world's websites and is very much active in development. PHP 7 just came out and they come up with new updated versions every few weeks at least.

I know of many jobs in North America requesting PHP work. In fact I have been approached on many occasions to dump my corporate job and freelance PHP work... especially related to Wordpress. I can tell you it is not dead at all.

e_i_pi has pretty much nailed the rest of the arguments.

:)

P.S. See latest TIOBE rankings. http://www.tiobe.com...ndex?page=index

This post has been edited by Martyr2: 23 March 2016 - 10:32 PM

Was This Post Helpful? 2
  • +
  • -

#11 no2pencil  Icon User is offline

  • Professor Snuggly Pants
  • member icon

Reputation: 6544
  • View blog
  • Posts: 30,650
  • Joined: 10-May 07

Re: Is PHP going to die?

Posted 23 March 2016 - 10:58 PM

I've certainly seen no shortage of PHP work.

Additionally, when working on my own projects, using AJAX to quickly fetch client <-> server avoiding reloads, I'm curious what language one would suggest other than PHP. I find setting up an MVC, building an incredibly small URI based custom system to be trivial, & leveraging AJAX to keep important parts of the system separated from the client to be clean & easy.

It seems that it wasn't that many years ago, & a lot of what Jon is saying about PHP I was hearing being said about Linux. It isn't taken seriously in the tech world, there are no jobs, it's not realistic, no one will invest...
Was This Post Helpful? 1
  • +
  • -

#12 nating04  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 23-March 16

Re: Is PHP going to die?

Posted 23 March 2016 - 11:47 PM

Php is very nice for the website,i don't think it will go die!
Was This Post Helpful? 0
  • +
  • -

#13 astonecipher  Icon User is offline

  • Too busy for this
  • member icon

Reputation: 2329
  • View blog
  • Posts: 9,356
  • Joined: 03-December 12

Re: Is PHP going to die?

Posted 24 March 2016 - 05:03 AM

Jon just has a strong dislike of php. In the last year, I have seen many new applications being started for scratch builds. Boston is not the headquarters for technology, not are trends there important else where. And, even if you are maintaining an existing system, you are still set for some time.

Python is still an entry level language for many schools. Which means there are a whole lot of people using it incorrectly. Does that make it a bad language as well?
Was This Post Helpful? 0
  • +
  • -

#14 jon.kiparsky  Icon User is offline

  • Screw Trump (before he screws you)
  • member icon


Reputation: 10625
  • View blog
  • Posts: 18,185
  • Joined: 19-March 11

Re: Is PHP going to die?

Posted 24 March 2016 - 07:38 AM

Quote

Jon just has a strong dislike of php


That's true. It's to be expected, considering I've used it before.

Quote

Boston is not the headquarters for technology, not are trends there important else where.


I suppose it's possible that the engineers I'm talking to from Amazon, Akamai, Google, EdEx, Square, and so forth only represent an idiosyncratic outpost of opinion not reflective of the rest of their organizations. All I know is, from where I'm sitting it seems like the height of insanity for a student in CS to chain their futures to the rotting corpse of PHP.

But whatever - your career is your choice.

Quote

And, even if you are maintaining an existing system, you are still set for some time.


This is a fantastically depressing piece of advice to give to someone starting out in the field.
Was This Post Helpful? 0
  • +
  • -

#15 xclite  Icon User is offline

  • I wrote you an code
  • member icon


Reputation: 1230
  • View blog
  • Posts: 4,016
  • Joined: 12-May 09

Re: Is PHP going to die?

Posted 24 March 2016 - 08:18 AM

At Amazon, you are not permitted to build a service in PHP. There is a whitepaper where the security team attempted to approve PHP for internal use and determined that the cost of securing even a single PHP app would be greater than the cost of every developer learning a better language.

I definitely share jon's hate of PHP. I don't see it dying, and it's not possible to say that all PHP code is horrible. But to me, the point is this: starting anew, why would you learn PHP over any other well-established framework?

New job postings for many of the green-field projects these days not just in Boston, but in much of the visible US tech world (which of course isn't the whole world, but it's where I look), are tilted well towards rails and node.js (which I don't understand, because Javascript has many similar weaknesses).

PHP isn't useless, it isn't gone, but it certainly isn't (and shouldn't) be the future without becoming something that isn't PHP in the first place.
Was This Post Helpful? 0
  • +
  • -

  • (6 Pages)
  • +
  • 1
  • 2
  • 3
  • Last »