4 ms·
> A lot of those large web properties are going to be using old versions of PHP. Is that true? PHP 5.6 and 7.0 were EOL'd in 2018, and acording to data at http
by CharlesW 7y ago
> A lot of those large web properties are going to be using old versions of PHP.
Is that true? PHP 5.6 and 7.0 were EOL'd in 2018, and acording to data at https://blog.packagist.com/php-versions-stats-2019-1-edition/ https://blog.packagist.com/php-versions-stats-2019-1-edition... the use of PHP 7 and later is ~90%. Web properties like DreamHost have supported PHP 7+ for years, and have deprecated versions before 7.1.
> Newer versions have breaking changes that make upgrading a large codebase difficult.
The documentation on this is pretty good[1], and there's some nice tooling that can help[2]. I wouldn't say that I've migrated "large" codebases, but FWIW in my limited experience this hasn't been particularly onerous.
[1] See https://www.php.net/manual/en/migration70.php https://www.php.net/manual/en/migration70.php and related appendices
[2] https://auth0.com/blog/migrating-a-php5-app-to-7-part-three/ https://auth0.com/blog/migrating-a-php5-app-to-7-part-three/
- blowski 7y agoEarlier this year I spoke to a team on PHP 5.1 - EOL was 2006! They have a massive PHP 4 style codebase, all in-house (no framework), a team of devs that knows it intimately and doesn’t want to leave because they have no job prospects. Sadly, judging by emails I get, there are a lot such teams operating in small towns.
- CharlesW 7y ago> Sadly, judging by emails I get, there are a lot such teams operating in small towns. I can believe that, even if I don't understand the mindset. Unless they're ready to retire, you'd think they'd want to keep their toolboxes current.
- jonwinstanley 7y agoThey must struggle to hire new devs, meaning no one comes in and tries to push the team onto newer versions
- tzs 7y agoI think a lot of places stick with whatever PHP version comes with the Linux distribution they use, only use Linux distributions with long term support, and only update to a later release of that distribution when the one they are on is about to go out of long term support. For Red Hat, that means there are places still on RHEL 5, 6, and 7, which is going to put them PHP at 5.4. It looks like Ubuntu 16 is the oldest Ubuntu still under support. That had PHP 7.0. Ubuntu end-of-life (when they stop getting security updates) are later than end of support. Ubuntu 14 EOL is April 2022. That has PHP 5.5.9. Debian 8 has long term support until June 2020, and PHP 5.6. Debian 9 has LTS to June 2022, and PHP 7.0. For those who are on the latest LTS or equivalent: RHEL 8 has PHP 7.2. Ubuntu 18 has PHP 7.2.24 Debian 10 has PHP 7.3.
- mad182 7y agoStats from packagist.com are biased towards newer versions. They are coming from composer users, and if you are using composer, you are a lot more likely to be using more or less up to date practices and relatively new version of php. There are millions of legacy projects and wordpress sites that have nothing to do with composer, and they are running on old versions of php much more often.