PHP_Compat::loadVersion | |
PEAR Manual | |
require_once 'PHP/CompatInfo.php'; |
array|false PHP_CompatInfo::parseArray (
array $files
, array $options = array()
)
You can parse an array of Files or Strings. To parse strings, $options['is_string'] must be set to true
Array of file names or code strings
An array of options where:
file_ext Contains an array of file extensions to parse for PHP code. Default: php, php4, inc, phtml
debug Contains a boolean to control whether extra ouput is shown.
ignore_functions Contains an array of functions to ignore when calculating the version needed.
ignore_constants Contains an array of constants to ignore when calculating the version needed.
ignore_files Contains an array of files to ignore. File names are case insensitive.
is_string Contains a boolean which says if the array values are strings or file names.
ignore_extensions Contains an array of php extensions to ignore when calculating the version needed.
ignore_versions Contains an array of php versions to ignore when calculating the version needed.
ignore_functions_match Contains an array of function patterns to ignore when calculating the version needed.
ignore_extensions_match Contains an array of extension patterns to ignore when calculating the version needed.
ignore_constants_match Contains an array of constant patterns to ignore when calculating the version needed.
throws no exceptions thrown
since version 0.7.0 (2004-03-09)
This function can not be called statically.
array - a hash which contains information keys: ignored_functions, ignored_extensions, ignored_constants, max_version, version, extensions, constants, tokens, cond_code
|
We get such result.
array ( 'ignored_files' => array ( ), 'ignored_functions' => array ( ), 'ignored_extensions' => array ( ), 'ignored_constants' => array ( ), 'max_version' => '', 'version' => '4.3.0', 'extensions' => array ( 0 => 'sapi_cgi', 1 => 'pcre', 2 => 'tokenizer', ), 'constants' => array ( ), 'tokens' => array ( ), 'cond_code' => array ( 0 => 7, 1 => array ( 0 => array ( ), 1 => array ( ), 2 => array ( ), ), ), '/opt/lampp/etc/pear/PEAR.php' => array ( 'ignored_functions' => array ( ), 'ignored_extensions' => array ( ), 'ignored_constants' => array ( ), 'max_version' => '', 'version' => '4.3.0', 'extensions' => array ( 0 => 'sapi_cgi', ), 'constants' => array ( ), 'tokens' => array ( ), 'cond_code' => array ( 0 => 7, 1 => array ( 0 => array ( ), 1 => array ( ), 2 => array ( ), ), ), ), '/opt/lampp/etc/pear/PHP/CompatInfo.php' => array ( 'ignored_functions' => array ( ), 'ignored_extensions' => array ( ), 'ignored_constants' => array ( ), 'max_version' => '', 'version' => '4.3.0', 'extensions' => array ( 0 => 'pcre', 1 => 'tokenizer', ), 'constants' => array ( ), 'tokens' => array ( ), 'cond_code' => array ( 0 => 0, 1 => array ( 0 => array ( ), 1 => array ( ), 2 => array ( ), ), ), ), ) |
Either all $input entries are files, or all are string (chunk of php code). You cannot have both (one or more) string and (one or more) file reference.
PHP_Compat::loadVersion | |
PEAR Manual | |