I need to determine the minimum PHP version required for this script. Actually it's an application consisting of multiple scripts. I don't have access to multiple versions of PHP installs, and I don't have time to go through the entire application checking functions and operators, etc., so I'm hoping there's another way to test, like some php.ini version setting or maybe some tool or something.
How do you determine minimum PHP version required for a script? Thanks in advance.
How do you determine what PHP version a script requires?
Moderator: General Moderators
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
I don't really see how you couldn't have access to multiple versions of php installs, but the general way is pulling the function list from php.net with their version incepts and cross check it. You can automate a lot of this after accumulating the incept information using php's internal tokenizer.
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
-
nickvd
- DevNet Resident
- Posts: 1027
- Joined: Thu Mar 10, 2005 5:27 pm
- Location: Southern Ontario
- Contact:
:jawdrop:arborint wrote:PEAR PHP_CompatInfo
Assuming that smiley doesn't exist... My jaw just hit the floor... I wish i knew about that package before...
Using D11's db class, it spit out:
Code: Select all
Array
(
[version] => 5.0.0
[extensions] => Array
(
[0] => mysql
)
[constants] => Array
(
[0] => private
[1] => interface
[2] => public
[3] => __CLASS__
)
)- Ollie Saunders
- DevNet Master
- Posts: 3179
- Joined: Tue May 24, 2005 6:01 pm
- Location: UK
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA

