Hacker News new | comments | ask | show | jobs | submit login

I wish every PHP developer would reread the docs and start using new features available instead of just continuing with what they know already just because it works. And of course if there was any way to remove all those old tutorials out there.

And every php developer would wish that suddenly all php in the world upgrades to v7. We are years away from 7 having a big penetration in the ecosystem. And years more till it hits enterprise.

I interview a lot of php-devs, and a very large proportion of PHP shops are still on 5.4 or earlier (which is all EOL). Very often they are not at all aware of the new features in 5.5 and later.

CodeIgniter is still popular and a lot of developers have no clue about namespaces and composer usage. It will really take a _long while_ before php7 becomes commonplace.

Yeah, this is where we're at. We have a ton of old servers running hundreds of sites, some of them up to 10 years old. It's just not feasible for us to upgrade those servers unless there is a massive security issue. So we have a lot of servers running 5.3 and 5.4.

We currently run on Debian stable and don't upgrade any packages beyond what Debian is supporting. In all likelihood, we won't be using PHP 7 until the next major Debian release, which I believe is scheduled for April 2017.

Regardless, we still have to support clients that are running older instances of PHP on their GoDaddy shared hosting. If it's not EOL, we can't justify not allowing them to use it so we're stuck with 5.5+ for the time being.

The performance improvements along with the support policy should hopefully encourage many sites to move to PHP 7 within a year; PHP 5.6 will be unsupported in 8 months (though it will receive security fixes for another year).

Unfortunately several of the most popular PHP based platforms will be stuck using PHP 5.9 or older for some time. Magento just recently in version 1.9 added support for PHP 5.6. There are still an allarming number of Drupal 6 based sites out there in large scale production that have trouble supporting PHP > 5.4

The recent releases of Magento 2.0 and Drupal 8.0 should help move more sites to modern versions of PHP, but there is a lot of work still to be done on contrib modules to get full functionality out of M2 and D8

If you want to keep your sanity, don't ask the question how much of the web (even worse intraweb) is driven by php 4, 5.1 and 5.2.

> And every php developer would wish that suddenly all php in the world upgrades to v7. We are years away from 7 having a big penetration in the ecosystem. And years more till it hits enterprise.

It will depend on hosting companies for some public websites and sysadmins for internal business apps. Ironically the sysadmins I know will be the hardest people to convince, for some reasons.

that's basically why as much as I can , I chose solutions with no dependencies when I'm working on apps for internal use (like Go,Nim,..). It solves a whole lot of issues. I just can't stand having to convince someone else to do his job in order to do mine.

I'd disagree with this. Performance increases get attention from system admins. It will take time yes, but if it saves them money, they will likely investigate sooner.

GoPHP5 successfully forced the community to move to 5 en masse. We can do the same again for 7 if we need to.

We will be going live with v7 as soon as I test it on the dev servers, so probably this week. Not everyone is so slow.

Who is we?

My business has a set of 4 public websites that run (mostly) on PHP. As the lead developer it is up to me (in this company) to decide when we upgrade.

Isn't that true for users of other major languages either? Java 1.4, Python 2, ES4, etc.

Our production environment is just this month upgrading to 5.6.

DreamHost are still in the process of upgrading to 5.5.

PHP is very likely to be the language used by Mort: http://blog.codinghorror.com/mort-elvis-einstein-and-you/

I doubt any of those developers are ever going to switch what they're already using unless they are forced by some external factor.

The more serious factor is: if you're on Hackernews, you're at least Elvis or even Einstein. Mort is out of reach for most internet media for programmers.

This is an arrogant and immature type of thing to write. This is programming, not high school cool-kids club. PHP is a wonderful tool that was mostly responsible for the dynamic web. Before it became popular, the web was mostly static HTML with an occasional CGI form, probably written in something like Perl, mostly just for emailing the webmaster. Maybe some small amount of JavaScript for something like rollover effects, but that's about it.

It's kind of like the situation today with the resurgence of JavaScript. One day the kids of the next decade will be posting snarky attitude basically calling JavaScript users retards because they don't use the cool-kids' PepoCOde. Lame. PHP is still excellent technology, and very relevant still for building dynamic server-side websites.

It used to be that people using JavaScript were made fun of for being "scripters", not "programmers". Everyone knows JavaScript is the language of Mort. Only Franken Elvis uses C.

I agree with rejecting the elitist framing but … the web was decidedly not mostly static before PHP came along. Perl had many frameworks (e.g. PHP started as one), as did conventional languages like Java, Python, with deep server integration possible using things like mod_perl. There were also a bunch of web-specific dynamic platforms like Cold Fusion and classic ASP / me-too JSP. Finally, there was server-side JavaScript as one of Netscape's offerings in the mid-90s.

What PHP added was primarily ease of use with the ability to deploy code simply by creating a single file, suitable for mass deployment at ISPs in the era where everyone used shared servers, and the combination of comparative ease of use with enough performance to do serious projects. Cold Fusion was also easy but didn't support things like persistent connections (read: order of magnitude slower) and the core language was very, very slow and also quite limited and buggy. You could find much faster options if you wanted to build, debug and deploy a conventional language like C++ or Java but the cost and risk was so much higher that this was unfavorable unless you really needed performance.

EDIT: if you want a snapshot of what the 90s web was like, http://philip.greenspun.com/panda/ was quite popular in the day. I know at least one well-known business which still has a revenue-generating website built in TCL, too…

PHP was easily one of the first to get some mainstream traction. I was using it in February '96, perhaps earlier. Classic ASP from MS was released in Dec 96, and didn't start making inroads (from my vantage point) until mid '97. I was stuck in '97 doing some odd front page weirdness (htc files? can't recall now) which were extremely limiting. At night, I'd go home and do PHP, and had an ecommerce system (horrible as it was) running on PHP/FI (php v2, essentially) in 1998.

By '97/'98 there were multiple vendors vying in this space - htmlos and ihtml are two names that stick with me, but there are some others I remember but can't recall names. And ColdFusion and whatnot, but... Perl and PHP were the big freebies, even by '97. ASP had speed on its side, but PHP already had convenience and price by '97, and it's gained ever since then. re: Java as server-side web platform - was outside my radar much, but the majority of people I worked with, even Java enthusiasts, didn't give it much credence before '99 - I don't think the infrastructure support was quite settled, and it was too 'wild west' for my colleagues (bunch of other reasons too). (IIRC, CF didn't support user-defined functions for several years, leading to much more difficult to maintain code than it should have been, but... memory gets hazy after 18 years).

But... PHP and Perl were free and largely "good enough" for enough of the problems most people were facing which is why they gained as much foothold as they did. ASP and CF both required a fairly hefty outlay and setup that you generally wouldn't be able to pay for without working in a corporate gig.

I definitely remember that era as the age of Perl but I should note that my first database-driven web app was in 1996, using a beta Java servlet runner with DB/2 on OS/2.

I'm happy to report that I got better at making technology choices.

I stand partly corrected. I only knew for certain servlet spec 2 was out in 99, and had not known anyone doing Java web serving stuff. I had colleagues doing java, and I worked in a commercial web house with those same colleagues, but none seemed to consider java web stuff (server side) usable (again memory's a bit hazy). I do know by 2000 some jumped in to servlets big time, but not many before that.

I think my first was perl/cgi in Jan 96 - not a full "web app" but I could read and write data via web forms to a database (msql IIRC). Feb 96 I know I was doing some PHP/FI, though still did a lot of Perl for years, mostly because that's what most hosts supported. For my own stuff, it was generally PHP even then when I had a choice.

If you were a corporate/academic programmer at the time, or lucky enthusiast, you had access to more things. Most commoner folk stepping up to a local ISP shell from BBS did not have access to all kinds of goodies. There also was less formal education available, so even when technologies existed, without mainstream marketing and documentation, it simply wasn't accessible to the masses. Cold Fusion was proprietary software from Macromedia you had to pay for, as I recall. Some admins were restrictive, and didn't even like you compiling your own stuff.

PHP really was responsible for the dynamic web. It had enough community support to enable newbies to wrap their head around the mind-boggling shift to dynamic server-side websites, and it became commonly provided with cheap or free shared hosting.

A big reason why it succeeded was because it was possible for people who only understood HTML to transition, since a PHP file could be nothing but HTML to start with, and people used a lot of templating rather than start from scratch with code that echoed out HTML. With things like Perl, it was not an HTML templating script first, and so that made it less streamlined and simple for the task of making websites.

Again, PHP made it better and easier but you aren't going to convince me that my direct experience didn't exist simply by repeating the same assertion.

Before PHP became widespread in the very late 90s there were many options for dynamic apps. I worked with ISPs which offered CGI or SSI even on cheap / free plans. Sure, it was ugly but a ton of people got what they needed done by going over to Matt's Script Archive and finding something they could hammer into shape. Before antique PHP apps, the security cliché was formmail.pl & a slew of long-forgotten guestbook / forum scripts.

I'm not saying that PHP didn't help considerably, only that it was very far from first. I remember having to make the case for using PHP 2 or 3 instead of many of those alternatives and it was based on cost and convenience, not the ability to do anything new.

I didn't say first, I said responsible, and first doesn't really matter. Albert Einstein's e=mc^2 wasn't first, it was already published by someone else written slightly differently. But he made it popular, and that's what counts for widespread adoption and propagation of tech.

You sound like an older hardcore nerd. You're from a different planet. What was going on in your circles was not at all a reflection of the web on a whole. Most people didn't even use ISPs in those times, they were on private systems like AOL. The dynamic web we know today, where almost every website is not static HTML, is because the majority of people making any little website had access to PHP, and free tutorials to learn.

Umm... no. I was talking about the subset of devs which are just chugging along without much thought put into the craft of programming. Which includes me sometimes, as well as many PHP developers. But not all of them.

Go search internet forums: "how i script PHP mail?" folks won't use the latest best practices.

And there were dynamic webpages before PHP, PHP just gave a ton more people access to them by easy installation, configuration and most importantly, development/feedback cycle.

I think you should actually read the text of the article you linked to. It contradicts the rest of your comment.

I did read it, I know that the conclusion is that reaching out to Mort should be attempted. But most Morts don't work in software companies. And I doubt that reaching them is easy or cheap.

And it's not elitism, it's a fact that many developers are Mort in all situations. Yes, we're all Mort from time to time, but some people are just Mort :)

Elitist much?

Not really. We're all relying on things we know to be working.

How often do you check 100% of the APIs you use for every kind of thing you develop (including shell scripts) for deprecation warnings or bad practice warnings?

I, for one, know that I don't. Except for NASA software, I don't think it's feasible.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact