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
posted by Leech to Computers & Internet (3 answers total) 1 user marked this as a favorite
 
Well, probably anyone did it before..
posted by Leech at 9:59 AM on September 3, 2007


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


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


« Older What options do I have with my work skills?   |   What's the word on ditching Word? Newer »
This thread is closed to new comments.