Data Structures for PHP 7
An extension providing specialized data structures as efficient alternatives to the PHP array. You can read about it in more detail in this blog post which highlights the API, performance and other benefits of using the extension.
The easiest way to install the extension is to use PECL:
pecl install ds
Enabling the extension
You'll need to add
extension=ds.so to your primary php.ini file.
If you encounter an "undefined symbol" error, see #2.
# To see where .ini files are located php -i | grep "\.ini"
You can also enable the extension temporarily using the command line:
php -d extension=ds.so
Note: Windows would use php_ds.dll instead.
There is a suite of PHPUnit tests that can be installed using Composer.
composer install # Install the test suite composer test # Run the tests composer memtest # Run the tests checking for memory leaks
You may include the polyfill as a dependency in your project. This allows your codebase to still function in an environment where the extension is not installed.
Please see CONTRIBUTING for more information.
The MIT License (MIT). Please see LICENSE for more information.