Last Updated: February 25, 2016
· endel
Profile 2015 2

Making your PHP 5.4+ code compatible with PHP 5.3

It's pretty common to find servers with PHP 5.3 version installed on it, which isn't supported by the community anymore.

So here it is a tool that read all your files and rewrite code using PHP 5.3 standards: https://github.com/endel/php-code-downgrade/

# clone the repository
git clone https://github.com/endel/php-code-downgrade.git && cd php-code-downgrade

# install composer dependencies
composer install

# run against your codebase
./php-code-downgrade ../my-php5.4-project

The advantages of using this is that you can write modern code without worrying about legacy PHP version support.

Say Thanks