PHP_Compat::loadVersion | |
PEAR Manual | |
The PHP_CompatInfo_Cli class, also known under it's wrapper name "pci", get the compatibility info from PHP Command Line Interpreter, on existing script or folder.
pci [options] -f FILE | -d DIR | -s STRING |
Identify the directory to parse to get compatibility info of its files contents.
Identify the file name (path) to parse to get compatibility info.
Content of a simple php code string without script tags <?php ... ?>
Do not recursively parse files into subdirectories when using --dir .
Set the verbose level. From 0 (no extra information) to 7 (full extra details).
In level 0, pci give only results related to -d or -f. See first line of the console table. If there are more than one line, next ones are details for each file of a directory/branch.
+-----------------------------+---------+---+------------+--------------------+ | Path | Version | C | Extensions | Constants/Tokens | +-----------------------------+---------+---+------------+--------------------+ | ...amp\tmp\HTML_CSS-1.5.1\* | 5.0.0 | 5 | pcre | __FILE__ | | | | | date | ...CTORY_SEPARATOR | | | | | | PHP_EOL | | | | | | public | | | | | | protected | +-----------------------------+---------+---+------------+--------------------+ | ...p\HTML_CSS-1.5.1\CSS.php | 5.0.0 | 1 | pcre | | | | | | date | | +-----------------------------+---------+---+------------+--------------------+ | ...1.5.1\tests\AllTests.php | 5.0.0 | 4 | | __FILE__ | | | | | | public | +-----------------------------+---------+---+------------+--------------------+ | ...L_CSS_TestSuite_Bugs.php | 5.0.0 | 4 | | protected | | | | | | public | +-----------------------------+---------+---+------------+--------------------+ | ...S_TestSuite_Standard.php | 5.0.0 | 4 | | __FILE__ | | | | | | ...CTORY_SEPARATOR | | | | | | protected | | | | | | public | +-----------------------------+---------+---+------------+--------------------+ | ...xamples\CSS_Advanced.php | 3.0.0 | 0 | | | +-----------------------------+---------+---+------------+--------------------+ |
In level 1, pci give results of level 0 with a summary of command line arguments. For example
pci -v 1 -d C:\wamp\tmp\HTML_CSS-1.5.1 |
Command Line resume : +-------------------------+---------------------------------------------------+ | Option | Value | +-------------------------+---------------------------------------------------+ | verbose | 1 | | dir | C:\wamp\tmp\HTML_CSS-1.5.1 | +-------------------------+---------------------------------------------------+ |
In level 2, pci give results of level 0 with the list of options used to parse file or directory. For example
pci -v 2 -d C:\wamp\tmp\HTML_CSS-1.5.1 |
Parser options : +-------------------------+---------------------------------------------------+ | Option | Value | +-------------------------+---------------------------------------------------+ | debug | FALSE | +-------------------------+---------------------------------------------------+ |
Note: Even when none option are used, the summary table is displayed.
In level 3, pci give results of level 0, 1 and 2. For example
pci -v 3 -n -d C:\wamp\tmp\HTML_CSS-1.5.1 |
Command Line resume : +-------------------------+---------------------------------------------------+ | Option | Value | +-------------------------+---------------------------------------------------+ | verbose | 3 | | no-recurse | 1 | | dir | C:\wamp\tmp\HTML_CSS-1.5.1 | +-------------------------+---------------------------------------------------+ Parser options : +-------------------------+---------------------------------------------------+ | Option | Value | +-------------------------+---------------------------------------------------+ | debug | FALSE | | recurse_dir | FALSE | +-------------------------+---------------------------------------------------+ |
In level 4, useless when using --dir , pci give results of level 0 with a list of functions implemented and their versions. For example
pci -v 4 -f C:\wamp\tmp\HTML_CSS-1.5.1\CSS.php |
+-----------------------------+---------+---+------------+--------------------+ | File | Version | C | Extensions | Constants/Tokens | +-----------------------------+---------+---+------------+--------------------+ | ...p\HTML_CSS-1.5.1\CSS.php | 5.0.0 | 1 | pcre | | | | | | date | | +-----------------------------+---------+---+------------+--------------------+ Debug: +---------+----------------------+-----------+------+ | Version | Function | Extension | PECL | +---------+----------------------+-----------+------+ | 4.0.0 | define | | no | | 4.0.0 | is_array | | no | | 4.0.0 | strtolower | | no | | 4.0.0 | substr | | no | ... (more lines not displayed here) ... | 4.0.0 | func_get_args | | no | | 4.0.4 | call_user_func_array | | no | | 4.0.6 | is_callable | | no | | 4.0.7 | version_compare | | no | | 4.3.0 | debug_backtrace | | no | | 5.0.0 | file_put_contents | | no | +---------+----------------------+-----------+------+ |
Level 5 is equivalent to level 4 + level 1.
Level 6 is equivalent to level 4 + level 2.
And finally, level 7 is equivalent to level 4 + level 2 + level 1.
Identify the file name (path) to a text file that contains on each line the name of each file to ignore when parsing a directory/branch.
Identify the file name (path) to a text file that contains on each line the name of each sub-directory to ignore when parsing a directory/branch.
Identify the file name (path) to a text file that contains on each line the name of each PHP function to ignore when parsing a directory or a single file.
Identify the file name (path) to a text file that contains on each line the name of each PHP constant to ignore when parsing a directory or a single file.
Identify the file name (path) to a text file that contains on each line the name of each PHP extension to ignore (all extension.functions) when parsing a directory or a single file.
Expect one or two values that identify which PHP version (and all its related functions) to ignore.
For example: ignore all PHP 5 functions (minor releases 0 thru 2), or only PHP 5.0.0 functions.
pci -f FILE | -d DIR -iv 5.0.0 5.2.0 pci -f FILE | -d DIR -iv 5.0.0 |
Identify the file name (path) to a text file that contains on each line a pattern (match a regular expression) of PHP function to ignore when parsing a directory, a single file, or a string.
Comments start with ";", as in php.ini, and blank lines are allowed.
If you want to use the preg_match compare function, put a "=", to start the line, follow by a regular expression.
Identify the file name (path) to a text file that contains on each line a pattern (match a regular expression) of PHP extension to ignore when parsing a directory, a single file, or a string.
Comments start with ";", as in php.ini, and blank lines are allowed.
If you want to use the preg_match compare function, put a "=", to start the line, follow by a regular expression.
Identify the file name (path) to a text file that contains on each line a pattern (match a regular expression) of PHP constant to ignore when parsing a directory, a single file, or a string.
Comments start with ";", as in php.ini, and blank lines are allowed.
If you want to use the preg_match compare function, put a "=", to start the line, follow by a regular expression.
Show full help usage with all switchs explained.
Print either an xml or text report (default).
For example:
pci -r xml -f C:\wamp\tmp\PHP_CodeSniffer-1.0.1\CodeSniffer.php |
|
pci -r xml -v4 -f C:\wamp\php\PEAR\PHP\CodeSniffer.php |
|
A comma separated list of file extensions to parse (only valid if parsing a directory). Default is: php, php4, inc, phtml
PHP_Compat::loadVersion | |
PEAR Manual | |