Skip to content

john-wilkinson/extension

 
 

Repository files navigation

Data structures for PHP 7

Extension

Build Status Build status


Blog post that covers the behaviour and performance benefits of each data structure.

Installation

# 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

Usage

Enabling the extension

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

Testing

There is a suite of PHPUnit tests that can be installed using Composer.

The extension has to be installed to run the tests.

Running the tests

composer install
composer test

Contributing

Please see CONTRIBUTING for more information.

Credits

License

The MIT License (MIT). Please see LICENSE for more information.

About

Data structures for PHP 7

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 98.2%
  • Other 1.8%