Skip to content
Swen Kooij edited this page Dec 1, 2013 · 2 revisions

The RocksDB PHP extension uses the PHP-CPP library to have the ability to develop PHP extensions in C++ instead of C. This makes the development of PHP extensions a lot more easy and it keeps the code more readable. The PHP-CPP library is still work in progress and lateley I have decided to contribute some code to it to add support for exceptions, object parameters and callable types. My version, which is used by the RocksDB PHP extension can be found here:

https://github.com/Photonios/PHP-CPP

To build and install the PHP-CPP library, execute the following commands:

git clone https://github.com/Photonios/PHP-CPP.git php-cpp
cd php-cpp
make clean
make
make install

The PHP-CPP library installs the dynamiclly linked library into:

/usr/lib/libphpcpp.so

Include headers are installed in:

/usr/include/phpcpp.h
/usr/include/phpcpp/*.h

To link against PHP-CPP using GCC:

gcc -lphpcpp -I/usr/include ...

More detailed information and documentation can be found on the PHP-CPP Github page:

https://github.com/EmielBruijntjes/PHP-CPP

Until all the changes in Photonios/PHP-CPP have been accepted and merged, the RocksDB PHP extension uses:

https://github.com/Photonios/PHP-CPP

Clone this wiki locally