Reference Database to be used with php-compatinfo library

3.6.0 2021-05-13 16:15 UTC


Latest Stable Version
Minimum PHP Version)
Branch Master

Main goal of this project is to provide a standalone database that references all functions, constants, classes, interfaces on PHP standard distribution and about 100 extensions.

This database is currently only support by its initial project php-compatinfo


  • a Symfony console application to handle data (json files) of the SQL database is provided on CLI API

More than 100 extensions (PHP standard distribution, but also PECL) are currently support :

  • reference all functions
  • reference all constants
  • reference all classes
  • reference all classes constants
  • reference all interfaces
  • reference all methods
  • reference all ini entries
  • reference all releases

Supported Versions

Major Version Release PHP compatibility
3.0.0 2020-12-29 PHP >= 7.2.0
2.0.0 2019-01-19 7.1.0 <= PHP < 8.0.0
1.0.0 2015-11-24 PHP >= 5.4.0

Currently, 109 extensions referenced in the database.

For future versions, see the file.


See examples/useExtensionFactory.php script to learn how to access to information in database.


  • PHP 7.2 or greater
  • PHPUnit 8 or greater (if you want to run unit tests)


The recommended way to install this library is through composer. If you don't know yet what is composer, have a look on introduction.

composer require bartlett/php-compatinfo-db

Configuring the Database

The database connection information is stored as an environment variable called DATABASE_URL.

# to use mysql:

# to use mariadb:

# to use sqlite:
# DATABASE_URL="sqlite:///${HOME}/.cache/bartlett/compatinfo-db.sqlite"

# to use postgresql:
# DATABASE_URL="postgresql://db_user:db_password@"

If you change database connection, you have to run following commands:

  • vendor/bin/doctrine orm:schema-tool:create
  • bin/compatinfo-db db:init

At dependencies installation, Composer use the sqlite back-end. You need to set up in your environment the DATABASE_URL variable.


  • Laurent Laville (Lead Developer)
  • Remi Collet (contributor on many extensions and unit tests)


This project is license under the BSD-3-Clause License - see the LICENSE file for details