PEAR logo

PHP_CompatInfo : The Definitive Guide



Chapter 6. API - Application Programming Interface

Table of Contents

Parsing data sources
Parser options

Parsing data sources

PHP_CompatInfo::parseArray - Parse an Array of Files
PHP_CompatInfo::parseDir - Parse a directory recursively for its Compatibility info
PHP_CompatInfo::parseFolder - Alias of parseDir
PHP_CompatInfo::parseFile - Parse a file for its Compatibility info
PHP_CompatInfo::parseString - Parse a string for its Compatibility info

Handle data sources are so easy. Call one of these five functions, with or without options, and you will retrieve an array of information with keys:

  • constants, PHP constants found in source code.
  • extensions, PHP modules/extensions functions found in source code.
  • version, minimum PHP version to run source code.
  • max_version, maximum PHP version to run source code.
  • ignore_files, files list that were ignored during source code parsing.
PHP_CompatInfo : The Definitive Guide v 1.4.1 : February 12, 2007