Blog post that covers the behaviour and performance benefits of each data structure.
# Dependencies you might need to install
# sudo add-apt-repository ppa:ondrej/php
# sudo apt-get update
# sudo apt-get install git build-essential php7.0-dev
git clone https://github.com/php-ds/extension "php-ds"
cd php-ds
# Build and install the extension
phpize
./configure
sudo make install
# Clean up the build files
make clean
phpize --clean
The best way to enable the extension is to create an ini file.
# To see where additional .ini files are located
php -i | grep "dir for additional .ini files"
# Create a new .ini file for the extension
echo "extension=ds.so" > /path/to/ini/files/30-ds.ini
You can also enable the extension temporarily using the command line:
php -d extension=ds.so
There is a suite of PHPUnit tests that can be installed using Composer.
The extension has to be installed to run the tests.
composer install
composer test
Please see CONTRIBUTING for more information.
The MIT License (MIT). Please see LICENSE for more information.