I have to find out the earliest PHP4 version my code will run under (I already know it runs on PHP5 and on PHP 4.4.9 (the last PHP4 version -- included in MAMP).
Are there code inspection tools that will do this? Do I need to install each PHP version and see what happens :-)
There is a PEAR package in the bartlett.laurent-laville.org channel for this: PHP_CompatInfo
Find out the minimum version and the extensions required for a piece of code to run
Examples could be found here.
Note: The original PEAR package is for PHP4 only, and is no longer maintained.
Before you manually download and install various versions of PHP, try to download the XAMPP versions, that have the old php binaries packaged:
Download links on oldapps.com
I use (unit) tests for this purpose.
for v in $versions; do
php$v -f tests.php
done
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With