Live data from Hacker News

PHP 5 and 7.0 end of life

hackertarget.com

31–40 of 122 posts

Re: PHP 5 and 7.0 end of life

#31

For a second, after reading the title, I thought PHP as a whole was end of life. That'd be fun. Which also made me think - does anybody know an example of a widely used programming language that voluntarily discontinued?

ColdFusion and ActionScript

Re: PHP 5 and 7.0 end of life

#32
post #15

isn't that ... too soon? the main reason i use PHP is because there is no time to rewrite stuff.

PHP 5 has been deprecated for several years now. PHP 7.0 was released in 2015, almost five years ago. The current version is PHP 7.3.

While upgrading from PHP 5.4 or lower to 7 can be... interesting, it's not all that difficult or time-consuming. PHP 5.5 or higher to 7 is much easier.

Re: PHP 5 and 7.0 end of life

#33
Ha. I know that shop that played themselves into a corner many years ago by “customizing” their Doctrine installation, thereby cutting themselves off of any future upstream updates and upgrades. If they were to get up-to-date now, they would have to rewrite their entire stack, including their magic Doctrine queries. They did hire one(!) Java developer to rebuild most of it in Java, but as usual in such cases, nobody has the time to explain to him how the old tangled mess actually works.

Re: PHP 5 and 7.0 end of life

#34

Yeah, yeah. Go tell that to my 10x php self-taught guy who's still running php 5.4 on a windows server 2003 in a wamp installation. He upgraded the bundled mysql with mariadb last year by dropping the executable in the folder (edit: just checked out, and the drop-in has been reverted back to mysql 5.0 because the upgrade path is impossible because apache 2.2). And of course this in-house guru for anything that happen…

Besides the "doesn't bother updating the passwords" point, this sort of "it's old so let's change it" attitude is unfortunately so pervasive in the software industry and I find it massively irritating because it's the same reason why a lot of software has gotten increasingly unstable over time. Instead of making only fixes and bringing a platform towards maturity they do the exact opposite, adding plenty of new bugs and breaking changes.

Keep in mind that the majority of people who need PHP (and technology in general...) have far more important things to do with their time than incessant trendchasing.

The saying about "known unknowns" and "unknown unknowns" is worth remembering too. The fact that a system has stayed working for over a decade should be enough to tell you that its creators did something right.

(I am in the process of restoring an 80-year-old refrigerator. ;-)

Re: PHP 5 and 7.0 end of life

#35

Yeah, yeah. Go tell that to my 10x php self-taught guy who's still running php 5.4 on a windows server 2003 in a wamp installation. He upgraded the bundled mysql with mariadb last year by dropping the executable in the folder (edit: just checked out, and the drop-in has been reverted back to mysql 5.0 because the upgrade path is impossible because apache 2.2). And of course this in-house guru for anything that happen…

I’ve just finish (yesterday night) to move old websites I host from a PHP 5.2 VM to 5.6 Some of them are more than 10 years old ! And as they represents a good share of my profits, I can’t dump them. I think I saw a Joomla 1.5. Those clients don’t want to pay someone to upgrade or redo their site. There are several intranets that will not support PHP 7 because they use the old mysql_ functions... So even I loose a lo…

It's not a great solution, but there are drop in libraries that shim the old mysql_* functions to their mysqli_* equivalents.

https://github.com/dshafik/php7-mysql-shim

It won't be 100% perfect and it's definitely not something I'd want to use long term, but it can help with the initial migration to PHP 7.

Re: PHP 5 and 7.0 end of life

#36

Yeah, yeah. Go tell that to my 10x php self-taught guy who's still running php 5.4 on a windows server 2003 in a wamp installation. He upgraded the bundled mysql with mariadb last year by dropping the executable in the folder (edit: just checked out, and the drop-in has been reverted back to mysql 5.0 because the upgrade path is impossible because apache 2.2). And of course this in-house guru for anything that happen…

Besides the "doesn't bother updating the passwords" point, this sort of "it's old so let's change it" attitude is unfortunately so pervasive in the software industry and I find it massively irritating because it's the same reason why a lot of software has gotten increasingly unstable over time. Instead of making only fixes and bringing a platform towards maturity they do the exact opposite, adding plenty of new bugs…

"If it ain't broke don't fix it" is always good advice. But some ancient duct-taped WAMP situation with insecure passwords needs to just be set on fire. Jesus christ, running Windows Server 2003 alone is something he should be fired for if its connected to the internet.

Re: PHP 5 and 7.0 end of life

#38
post #35

Earlier quoted context omitted.

I’ve just finish (yesterday night) to move old websites I host from a PHP 5.2 VM to 5.6 Some of them are more than 10 years old ! And as they represents a good share of my profits, I can’t dump them. I think I saw a Joomla 1.5. Those clients don’t want to pay someone to upgrade or redo their site. There are several intranets that will not support PHP 7 because they use the old mysql_ functions... So even I loose a lo…

It's not a great solution, but there are drop in libraries that shim the old mysql_* functions to their mysqli_* equivalents. https://github.com/dshafik/php7-mysql-shim It won't be 100% perfect and it's definitely not something I'd want to use long term, but it can help with the initial migration to PHP 7.

Came here to say the same. I've used them long-term on legacy codebases and they work great for allowing new development to move onto modern PHP.

While I'm using https://github.com/dshafik/php7-mysql-shim, another to look at is https://github.com/mattbit/mysql-compat

Re: PHP 5 and 7.0 end of life

#39
post #31

For a second, after reading the title, I thought PHP as a whole was end of life. That'd be fun. Which also made me think - does anybody know an example of a widely used programming language that voluntarily discontinued?

ColdFusion and ActionScript

ColdFusion's still around. https://www.adobe.com/products/coldfusion-family.html

Re: PHP 5 and 7.0 end of life

#40
post #37

Are there any issues running PHP 5.6-based code on a PHP 7.x VM?

Very few. It's worth running one of the code analysers over your codebase to check: https://github.com/PHPCompatibility/PHPCompatibility

I upgraded a large project last month, and this found 6 changes I had to make in 20k LOC.

Post reply on HN