How do I know my code which version of the language is compatible? Is there a way to figure out which is the minimum version of PHP language that can execute it without error? M
Most likely you need to have different PHP versions installed. Then you can check compatibility of your code with specified PHP version using shell:
find . -name *.php | xargs -n1 /usr/bin/php -l
php -l
command runs PHP in syntax check only mode. The command above will check each PHP file in your project againts compatibility with PHP version located at /usr/bin/php.