PECL [1]
 
    PHP Extension Community Library (PECL)

    PECL is a repository of PHP extensions that are made available to you via the PEAR packaging system.



Obtain and install PECL extensions

    A shared extension must be built, installed, and loaded.

    How to download: [2]

    Download address [5]



Installing a PHP extension on Windows

    Two ways to load a PHP extension: either compile it into PHP, or load the DLL. Loading a pre-compiled extension is the easiest and preferred way.

    PHP extensions are usually called "php_*.dll" (where the star represents the name of the extension) and they are located under the "PHP\ext" folder.

    Extension settings (version numbers-at least first two should match, thread safety settings, processor architecture-x86_x64..., debugging settings, etc.) should match all the settings of the PHP executable (phpinfo) you are using.



Installing on Unix (compiling)

    Using pecl command [3]
    
        ## This will download the source for extname, compile, and 
        ## install extname.so into your extension_dir. 
        ## extname.so may then be loaded via php.ini
        $ pecl install extname


    Using phpize [4]

        ## The phpize command is used to prepare the build environment 
        ## for a PHP extension.
        $ cd extname
        $ phpize
        $ ./configure
        $ make
        $ sudo make install

        A successful install will have created extname.so and put it into the PHP extensions directory. You'll need to and adjust php.ini and add an extension=extname.so line before you can use the extension.

    

Load the extension through php.ini

    Extensions can be loaded by adding an extension directive to the php.ini file, or through the use of the dl() function.


    php.ini

        extension = php_extname.dll   ; windows
        extension_dir = ...           ; setting the location of DLLs    




References

    [1] PHP Manual - PECL: http://php.net/manual/en/install.pecl.intro.php
    [2] Downloading PECL extensions:  http://php.net/manual/en/install.pecl.downloads.php
    [3] Compiling shared PECL extensions with the pecl command:  http://php.net/manual/en/install.pecl.pear.php
    [4] Compiling shared PECL extensions with phpize:  http://php.net/manual/en/install.pecl.phpize.php
    [5] http://pecl.php.net/