2012-03-05: PHP_CompatInfo 2.3.0 Released

Release highlights:

  • Each new minor version is supposed to follow a new PHP release, which add new features. It’s true with PHP_CompatInfo 2.3.0 that support PHP 5.4.0.

Read the CHANGELOG for a full list of all additions, changes and bug fixes. Changes are documented in the updated User Guide. See the Installation page for downloads and installation instructions.

Laurent Laville

1. Introduction

PHP_CompatInfo branch 1.x is still compatible with PHP4, that is from an old age now (unmaintained). You can find it on PEAR main site on its project page.

PHP_CompatInfo branch 2.x is a full rewrite with PHP5. Since RC3 the PHP parser engine used is PHP_Reflect. It’s an improved version with callbacks to what ever token you want feature from basic concept version of PHP_TokenStream.

2. Overview

PHP_CompatInfo 2 provides two servers API :

  • a Command Line Interface (CLI) tool named phpci

  • a web browser interface

Requirements
  • PHP 5.2.0 minimum

  • ezc/Base 1.8 minimum

  • ezc/ConsoleTools 1.6.1 minimum (for progress bar with CLI phpci tool)

  • pear/Console_CommandLine 1.1.3 minimum since RC3 (for CLI phpci tool)

  • bartlett/PHP_Reflect 1.2.0 minimum (PHP parser)

  • pcre extension

  • SPL extension

  • dom extension

  • libxml extension

  • phpunit/PHP_Timer 1.0.0 (utility class for timing)

  • (optional) pear/Net_Growl 2.4.0 minimum (for growl audit observer)

  • (optional) PHPUnit 3.5.0 minimum (to run unit tests)

  • (optional) an XSLT processor if you want to produce an xHTML report from a phpci xml report

Version 2.0.0
  • support 61 extensions.

Version 2.1.0
  • support 63 extensions.

Version 2.2.0
  • support 65 extensions.

Version 2.3.0
  • support 67 extensions.

The phpci tool may inform you on what of those extensions are or not loaded on your system.

Run command

    $ phpci list-references

Will output results as follow. May differ depending of your extensions loaded.

    -------------------------------------------------------------------------------
    PHP COMPAT INFO DATABASE REFERENCE
    -------------------------------------------------------------------------------
      EXTENSIONS                                 EXTENSION         VERSION
    -------------------------------------------------------------------------------
      apc                                        3.1.7             4.0.0
    L bcmath                                                       4.0.0
    L bz2                                                          4.0.4
    L calendar                                                     4.0.0
      Core                                                         4.0.0
    L ctype                                                        4.0.4
    L curl                                                         4.0.2
    L date                                                         4.0.0
    L dom                                        20031129          5.0.0
      enchant                                    1.1.0             5.3.0
      ereg                                                         4.0.0  5.3.0
      fileinfo                                   1.0.5-dev         4.0.0
    L filter                                     0.11.0            5.2.0
    L ftp                                                          4.0.0
    L gd                                                           4.0.0
    L gettext                                                      4.0.0
      gmp                                                          4.0.4
    L hash                                       1.0               5.1.2
    L iconv                                                        4.0.5
    L imap                                                         4.0.0
      intl                                       1.1.0             5.2.4
    L json                                       1.2.1             5.2.0
      ldap                                                         4.0.0
    L libxml                                                       5.0.0
    L mbstring                                                     4.0.6
    L mcrypt                                                       4.0.0
      memcache                                   3.0.6             4.3.3
      memcached                                  1.0.2             5.2.0
    L mhash                                                        4.0.0
    L mysql                                      1.0               4.0.0
    L mysqli                                     0.1               5.0.0
    L OAuth                                      1.0-dev           5.1.0
    L openssl                                                      4.0.4
      pcntl                                                        4.1.0
    L pcre                                                         4.0.0
    L PDO                                        1.0.4dev          5.1.0
      pgsql                                                        4.0.0
      Phar                                       2.0.1             5.2.0
      posix                                      306939            4.0.0
      readline                                   2.0.1             4.0.0
      recode                                     2.0.1             4.0.0
      Reflection                                                   5.0.0
    L session                                                      4.0.0
    L shmop                                                        4.0.0
    L SimpleXML                                  0.1               5.0.0
      snmp                                                         4.0.0
    L soap                                                         5.0.0
    L sockets                                                      4.1.0
    L SPL                                        0.2               5.0.0
    L SQLite                                     2.0-dev           5.0.0
      sqlite3                                    0.7-dev           5.3.0
      ssh2                                       0.11.0            5.0.0
    L standard                                                     4.0.0
      sysvmsg                                    306939            4.3.0
      sysvsem                                                      4.0.0
      sysvshm                                                      4.0.0
    L tidy                                       2.0               4.0.0
    L tokenizer                                  0.1               4.2.0
    L wddx                                                         4.0.0
    L xdebug                                     2.1.0             5.2.0
    L xml                                                          4.0.0
    L xmlreader                                  0.1               5.0.0
    L xmlrpc                                     0.51              4.1.0
    L xmlwriter                                  0.1               5.1.2
    L xsl                                        0.1               5.0.0
    L zip                                        1.9.1             4.1.0
    L zlib                                       1.1               4.0.0
    -------------------------------------------------------------------------------
    A TOTAL OF 67 EXTENSIONS WERE FOUND AND 44 LOADED
    -------------------------------------------------------------------------------
    Time: 2 seconds, Memory: 5.00Mb
    -------------------------------------------------------------------------------

3. Features

  • Parse a single file

  • Parse a directory recursively or not

  • Parse a list of files and/or directories

  • Ability to give a list of extensions to ignore when calculating the version needed

  • Ability to give a list of interfaces to ignore when calculating the version needed

  • Ability to give a list of classes to ignore when calculating the version needed

  • Ability to give a list of functions to ignore when calculating the version needed

  • Ability to give a list of constants to ignore when calculating the version needed.

  • Ability to give a list of files to ignore when calculating the version needed

  • Ability to give a list of directories to ignore when calculating the version needed

  • Ability to use a custom extensions list or by default only extensions loaded, to parse PHP code

  • Event driven and listeners system to audit parsing process

4. Documentation

The PHP_CompatInfo manual is available in a selection of formats. Pick a format from the table below to start downloading.

Language Single HTML file Many HTML files HTML Help file PDF file EPUB file

English

pci-book.html.zip 517Kb

phpci-book.chunked.zip 464Kb

phpci-book.chm.zip 469Kb

phpci-book.pdf 512Kb

phpci-book.epub.zip 446Kb

5. Appendix A: Changelog

6. Appendix B: License

Released under the BSD license, you are free to do whatever you want, even in a commercial environment. You are also encouraged to contribute.

7. Appendix C: Credits

I would like to thanks here specially a guy without who this PHP QA tool won’t be born.

Davey Shafik

Original author, he introduced his proposal in 2004, that gave birth of a PEAR package named PHP_CompatInfo.

http://daveyshafik.com/

I would also like to thanks a guy who help me to enhance support of more than 50 extensions.

Remi Collet

Contributor of many extensions reference and unit tests. He has joined the team on version 2.0.0RC2

http://blog.famillecollet.com/

All pages of this site, and user guide were generated with AsciiDoc 8.6.6, assisted by FOP 1.0 (for PDFs). Automated build process uses Phing 2.4.9

Convert the HTML Help source (.hhp and .html) files to HTML Help (.chm) files using the Microsoft HTML Help Compiler.