CompatInfo may be installed in several ways, choose your favorite.
Warning
|
Please read the in case you are upgrading from a version 2.x of PHP CompatInfo. |
Before you install PHP CompatInfo, you will need an operating system with PHP 5.3.2 or later installed,
Put a file named composer.json at the root of your project, with the content below:
{
"require": {
"bartlett/php-compatinfo": "4.5.0"
}
}
And ask Composer to install the dependencies:
$ php composer.phar install
Tip
|
With composer |
Tip
|
You can also use Composer to create a new project from an existing CompatInfo package. This is the equivalent of doing a git clone checkout followed by a composer install of the vendors. $ php composer.phar create-project bartlett/php-compatinfo /path/to/install 4.5.0 Where /path/to/install is your install directory. |
The recommended way for newbies, or just to have a look on features of this library, is to download a PHP Archive that contain all required dependencies of PHP CompatInfo bundled in a single file.
$ wget http://bartlett.laurent-laville.org/get/phpcompatinfo-4.5.0.phar
$ chmod +x phpcompatinfo-4.5.0.phar
$ mv phpcompatinfo-4.5.0.phar /usr/local/bin/phpcompatinfo
$ phpcompatinfo
You can also immediately use the PHAR after you have downloaded it.
$ wget http://bartlett.laurent-laville.org/get/phpcompatinfo-4.5.0.phar
$ php phpcompatinfo-4.5.0.phar