Bulk update your code to run with PHP 7.0+

Migrating from PHP 5.x to PHP 7.x is a hassle when youre dealing with a large website or multiple websites on a server. So, Ive made some improvements to an existing a shell script to recursively modify directories of PHP pages that load in 4 or 5 but will no longer run in PHP 7.

Continue reading Bulk update your code to run with PHP 7.0+

Bulk update scripts to PHP 5.4+

I’ve written a shell script to bulk update PHP pages, replacing ereg, eregi with preg_match, ereg_match with preg_match, split with preg_split and changing the $HTTP globals to their modern versions. I haven’t seen this anywhere else, so I’d thought I should post something here.

Continue reading Bulk update scripts to PHP 5.4+