Proposal for "PHP_Compatibility"

» Metadata » Status
» Description
Finds the lowest version of PHP needed to run a PHP file/PHP files in a folder. Will soon parse a script and check all includes and find the lowest common version. Additionally, it finds all extensions needed to run the code. This could easily be used in PEAR_PackageFileManager, say you set a PHP dependency of "auto" and it'll detect it. Also could be used to find all extension dependencys.
» Dependencies » Links
  • PHP 4.3.0
  • Tokenizer Extension
» Timeline » Changelog
  • First Draft: 2004-02-19
  • Proposal: 2004-02-19
  • Call for Votes: 2004-02-27
  • Davey Shafik
    [2004-02-21 21:52 UTC]

    Updated the package to 0.2, removed parseScript - its just not feasible. chdir() and the include_path/set_include_path make it nigh-on-impossible without a LOT more (time consuming) parsing. Added parseString() thinking of adding a parseArray() then you could run a script and pass it get_included_files... its an idea.
  • Davey Shafik
    [2004-02-26 01:59 UTC]

    Updated to 0.3 now checks for __FILE__, __LINE__, __FUNCTION__ and __CLASS__ constants. Added example that shows this. Removed some unneccessary code.
  • Davey Shafik
    [2004-02-26 05:35 UTC]

    Updated to 0.4. Added a parseArray() method which - with get_included_files - can be used similarly to how parseScript() would have been. Additionaly, I added a $debug param to all public methods which gives much more detailed output ($return[$version] = $function_name is added to the return value for every function found). Documentation updated and examples for additions in 0.3 and 0.4 have been added.