Forum Moderators: coopster

Message Too Old, No Replies

Program that can read a script file and determine PHP version

         

Allen

9:02 am on Apr 11, 2003 (gmt 0)

10+ Year Member



Hi all,

At the moment I do this manually, but I was wondering if anyone has ever written a program to do it.

because I'm often writing scripts that run on other people's servers, I need to make sure that the script will run with the version of PHP available, so I have to run through the script checking al the functions against the PHP version.

Now what I'd like is a program which runs through the script files (including included files) and tells me what version of PHP my script requires. I would also like, if possible, to it so that I can either input the version of PHP I need the script to be compliant with and the program will tell me why my script won't run on the version (ie. what functions aren't in that version) or to have it list all the PHP functions I'm using and what version they require.

Does anyone know of a program which will do this?

TIA

Allen

jatar_k

2:30 pm on Apr 11, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



how about using this
phpversion [php.net]

or

Note: This information is also available in the predefined constant PHP_VERSION.