PEAR logo

PHP_CompatInfo : The Definitive Guide

PHP_CompatInfo Manual

First Edition

Edited by

Laurent Laville

This work is licensed under the Creative Commons Attribution License. To view a copy of this license, visit

Revision History
Revision 1.8.0 August 1, 2008
  • Since release 1.8.0b1, the core of API was rewritten following the MVC pattern. It's allow now to customize more easily the output at end-user convenience. Please read the What is new section to learn more about this major version.

  • There are no Backward Compatibility breaks. You can still continue to run your old scripts with the new API 1.8.0

  • DO NOT forget to read also the FAQ to see if your problem as already found a solution.

Revision 1.7.0 April 17, 2008
  • Improved detection on conditionnal code: with 3 new options : ignore_functions_match, ignore_extensions_match, ignore_constants_match.

    See the API part, Parser options section of Reference Guide.

    See also new key-information "cond_code" with a level of warning about all functions/extensions/constants conditionned.

Revision 1.6.0 February 16, 2008
  • loadVersion() may return both function or function+constant list. 2 examples added in Reference Guide.

  • Allow to parse a string without using script tags <?php ... ?> with new -s or --string parameter on CLI

  • Allow to print either an "xml" or "cli" (default) report with new -r | --report on CLI

Revision 1.5.1 November 19, 2007
  • Manual license Creative Commons upgrade from version 2.0 to 3.0

  • Added new section, about what is new in releases.

Revision 1.5.0 November 15, 2007
  • Split API note section with related since data, display now release number and date.

  • Version 1.5.0 marked drop down support of PHP3 script detection. If you still used PHP3 scripts, you need to install version 1.4.3 of PHP_CompatInfo.

  • Important reference changes:

    Windows script user "compatinfo.bat" was renamed to "pci.bat"

    *Nix script user "pcicmd" was renamed to "pci" and is located now into PHP_PEAR_INSTALL_DIR

Revision 1.4.1 February 12, 2007
  • Readability improved with hilighted source code (GESHI) and make html W3C strict compliant (with TIDY).

  • Copyright bumped to 2007
Revision 1.4.0 September 27, 2006

The first edition of this Guide is now completed. It cover version 1.4.0 (stable) of PHP_CompatInfo.

Table of Contents

Organization of This Book
I. Introduction
1. About PHP_CompatInfo
2. What's New in version ?
3. FAQ - Frequently Asked Questions
4. Installing PHP_CompatInfo
II. Getting Started
5. Overview
6. Basic detection
7. Advanced detection
8. Conditional Code Analysis
9. The Command-Line Parser
10. Outputting Results
III. Reference Guide
11. API - Application Programming Interface
12. PHP version history
13. Observers
14. Parsing data sources
15. Parser infrastructure
16. Renderer infrastructure
17. Array Renderer
18. Csv Renderer
19. Html Renderer
20. Null Renderer
21. Text Renderer
22. Xml Renderer
23. Command-Line version
PHP_CompatInfo : The Definitive Guide v 1.8.0 : August 1, 2008