PHP_CompatInfo
Find out the minimum version and the extensions required for a piece of code to run
Summary
Features
parse a single file
parse a folder/directory
parse an array (list of file)
ability to give a list of functions to ignore when calculating the version needed
ability to give a list of directories to ignore when calculating the version needed
ability to go recursively or not into folder to find files
ability to reduce or extends list of extensions to parse for PHP code
ability to give a list of constants to ignore when calculating the version needed. Available since version 1.2.0
ability to get list of functions related to a PHP version (or a subset). Available since version 1.2.0
ability to give a list of (related functions of) php modules/extensions to ignore when calculating the version needed. Available since version 1.4.0
ability to give a list of (related functions of) php versions to ignore when calculating the version needed. Available since version 1.4.0
ability to exclude from parsing scope, some functions, extensions, constants, based on conditionnal code. Available since version 1.7.0
ability to know conditional code (such as function_exists) used by php scripts. Available since version 1.7.0
System Requirements
Mandatory resources :
PHP 4.3.10 or newer.
PEAR 1.5.4 or newer.
PEAR::Console_Table 1.0.5 or newer.
PEAR::Console_GetArgs 1.3.3 or newer.
PEAR::File_Find 1.3.0 or newer.
PEAR::Event_Dispatcher 1.0.0 or newer.
tokenizer extension.
Optional resources :
PHPUnit 3.2.0 or newer.
PEAR::XML_Util 1.1.4 or newer.
PEAR::XML_Beautifier 1.1 or newer.
PEAR::Console_ProgressBar 0.5.2beta or newer.
PEAR::Var_Dump 1.0.3 or newer.
PEAR::HTML_Table 1.8.2 or newer.
About
- Table of Contents
- FAQ -- Answers to most Frequently Asked Questions
- News -- What is New in version ?
- Installing PHP_CompatInfo -- two solutions: auto and manual
Getting started
- Table of Contents
- Overview -- features and usage patterns
- Basic detection -- parse data source with default options
- Advanced detection -- parse data source with additional options
- Conditional Code Analysis -- improve accuracy detection with conditional code
- The Command-Line Parser -- parsing data source with CLI
- Outputting Results -- how to use the renderer system
Reference guide
PHP version history
- Table of Contents
- PHP_CompatInfo::loadVersion() -- Load components list
Observers
- Table of Contents
- PHP_CompatInfo::addListener() -- Registers a new listener
- PHP_CompatInfo::removeListener() -- Removes a registered listener
Parsing Data Sources
- Table of Contents
- PHP_CompatInfo::parseArray() -- Parse an Array of Files
- PHP_CompatInfo::parseDir() -- Parse a directory
- PHP_CompatInfo::parseFolder() -- Alias of parseDir
- PHP_CompatInfo::parseFile() -- Parse a single file
- PHP_CompatInfo::parseString() -- Parse a string
- PHP_CompatInfo::parseData() -- Parse a data source
Parser Infrastructure
- Table of Contents
- constructor PHP_CompatInfo_Parser::PHP_CompatInfo_Parser() -- Parser Class constructor
- PHP_CompatInfo_Parser::setOutputDriver() -- Set up driver to be used
- PHP_CompatInfo_Parser::addListener() -- Registers a new listener
- PHP_CompatInfo_Parser::removeListener() -- Removes a registered listener
- PHP_CompatInfo_Parser::notifyListeners() -- Post a new notification to all listeners registered
- PHP_CompatInfo_Parser::loadVersion() -- Load components list
- PHP_CompatInfo_Parser::getDirlist() -- Returns list of directory parsed
- PHP_CompatInfo_Parser::getFilelist() -- Returns list of files parsed
- PHP_CompatInfo_Parser::getIgnoredFiles() -- Returns list of files ignored
- PHP_CompatInfo_Parser::parseData() -- Parse a data source
Renderer Infrastructure
- Table of Contents
- constructor PHP_CompatInfo_Renderer::PHP_CompatInfo_Renderer() -- Base Renderer Class constructor
- PHP_CompatInfo_Renderer::factory() -- Create required instance of the Output 'driver'
- PHP_CompatInfo_Renderer::update() -- Update the current view
- PHP_CompatInfo_Renderer::startWaitProgress() -- Initialize the wait process
- PHP_CompatInfo_Renderer::stillWaitProgress() -- Update the wait message
- PHP_CompatInfo_Renderer::endWaitProgress() -- Finish the wait process
- PHP_CompatInfo_Renderer::isIncludable() -- Checks if in the include path
Array Renderer
- Table of Contents
- constructor PHP_CompatInfo_Renderer_Array::PHP_CompatInfo_Renderer_Array() -- Array Renderer Class constructor
- PHP_CompatInfo_Renderer_Array::display() -- Display final results
Csv Renderer
- Table of Contents
- constructor PHP_CompatInfo_Renderer_Csv::PHP_CompatInfo_Renderer_Csv() -- Csv Renderer Class constructor
- PHP_CompatInfo_Renderer_Csv::display() -- Display final results
Html Renderer
- Table of Contents
- constructor PHP_CompatInfo_Renderer_Html::PHP_CompatInfo_Renderer_Html() -- Html Renderer Class constructor
- PHP_CompatInfo_Renderer_Html::display() -- Display final results
- PHP_CompatInfo_Renderer_Html::getStyleSheet() -- Returns the custom style sheet
- PHP_CompatInfo_Renderer_Html::setStyleSheet() -- Set a custom style sheet
- PHP_CompatInfo_Renderer_Html::toHtml() -- Returns HTML code
Null Renderer
- Table of Contents
- constructor PHP_CompatInfo_Renderer_Null::PHP_CompatInfo_Renderer_Null() -- Null Renderer Class constructor
- PHP_CompatInfo_Renderer_Null::display() -- Consumes output events
Text Renderer
- Table of Contents
- constructor PHP_CompatInfo_Renderer_Text::PHP_CompatInfo_Renderer_Text() -- Text Renderer Class constructor
- PHP_CompatInfo_Renderer_Text::display() -- Display final results
Xml Renderer
- Table of Contents
- constructor PHP_CompatInfo_Renderer_Xml::PHP_CompatInfo_Renderer_Xml() -- Xml Renderer Class constructor
- PHP_CompatInfo_Renderer_Xml::display() -- Display final results
Command-Line version
- Table of Contents
- constructor PHP_CompatInfo_Cli::PHP_CompatInfo_Cli() -- Command-Line Class constructor
- PHP_CompatInfo_Cli::run() -- Run the CLI version
