How can I check if my sites will run in PHP5 ?
September 3, 2007 8:47 AM Subscribe
Is there any script or sh command to check all given scripts or files to see if it will be compatible with PHP5?
I know that PHP5 has some issues with backwards compatibility, and I need to upgrade my server PHP version from 4 to 5, but I've around 40 sites running (most of them with no big PHP functionality, small contact forms and that).
Is there any script or sh command to check all given scripts or files to see if it will be compatible with PHP5?
I think it couldn't be a big problem to do something like this, specially if it's only based on this reference:
http://ar.php.net/manual/en/migration5.incompatible.php
I know that PHP5 has some issues with backwards compatibility, and I need to upgrade my server PHP version from 4 to 5, but I've around 40 sites running (most of them with no big PHP functionality, small contact forms and that).
Is there any script or sh command to check all given scripts or files to see if it will be compatible with PHP5?
I think it couldn't be a big problem to do something like this, specially if it's only based on this reference:
http://ar.php.net/manual/en/migration5.incompatible.php
Best answer: You’d need a parser and syntax checker to do it right. I know there’s at least one PHP parser that exists written in Scheme, but I don’t know if there is anything that will simply vouch for PHP 5 compatibility.
In addition to the relatively simple parsing problem, you’d need the incompatible changes to be detectable in static analysis.
posted by ijoshua at 12:46 PM on September 3, 2007
In addition to the relatively simple parsing problem, you’d need the incompatible changes to be detectable in static analysis.
posted by ijoshua at 12:46 PM on September 3, 2007
Best answer: Really, there shouldn't be a lot of problems... and php5 really is a lot better in all kinds of little ways. The main thing is that you really wanna use this an opportunity to be fully into the $_REQUEST/$_POST/$_GET/$_SERVER/etc... model of coding, away from the register variables stuff.
posted by ph00dz at 6:32 AM on September 4, 2007
posted by ph00dz at 6:32 AM on September 4, 2007
This thread is closed to new comments.
posted by Leech at 9:59 AM on September 3, 2007