Complex Version Checking
| From: | Alan McFarlane | Date: | Fri, 08 Feb 2002 00:18:03 +0000 |
| Subject: | Complex Version Checking | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-83938@lists.php.net to get a copy of this message | ||
Does anyone know of a method of testing the minimum version of PHP required
for a particular job? - Assume I'm developing a web-site for a customer who
has PHP 4.0.5 installed. Now, I tend to use the latest version (4.1.1), so I
have to be a little careful in certain aspects, but it would be useful if I
could run a script across all .php files which would tell me what the
minimum version required is.
I suspect that this means writing a simple parser - coping with #defines,
reading functions and class based functions, checking variables (like the
new $_GET, _$POST etc) or is there an easier way - any regex gurus out
there?
Ideally, I should be able to run a script which produces a simple output -
the minim version number required to run all of the passed scripts.