Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | 03-Nov-2024 | - | ||||
.github/workflows/ | H | 06-Oct-2021 | - | |||
src/ | H | 29-Jul-2023 | - | |||
.editorconfig | H A D | 06-Dec-2019 | 244 | 13 | 9 | |
.gitignore | H A D | 18-Dec-2023 | 474 | 52 | 52 | |
.valgrindrc | H A D | 06-Dec-2019 | 84 | 4 | 3 | |
CHANGELOG.md | H A D | 19-Oct-2021 | 3 KiB | 130 | 101 | |
CONTRIBUTING.md | H A D | 06-Dec-2019 | 1.1 KiB | 22 | 11 | |
Dockerfile | H A D | 18-Dec-2023 | 136 | 5 | 3 | |
LICENSE | H A D | 06-Dec-2019 | 1.1 KiB | 21 | 17 | |
README.md | H A D | 19-Dec-2023 | 2.6 KiB | 85 | 53 | |
appveyor.yml | H A D | 19-Dec-2023 | 3 KiB | 102 | 70 | |
composer.json | H A D | 19-Dec-2023 | 450 | 20 | 19 | |
config.m4 | H A D | 06-Dec-2019 | 3.4 KiB | 81 | 75 | |
config.w32 | H A D | 09-Nov-2020 | 2.3 KiB | 100 | 88 | |
dev.sh | H A D | 18-Dec-2023 | 84 | 3 | 1 | |
docker-compose.yml | H A D | 18-Dec-2023 | 166 | 8 | 8 | |
ext-ds.ini | H A D | 18-Dec-2023 | 15 | 1 | 1 | |
package.xml | H A D | 19-Dec-2023 | 8.2 KiB | 168 | 162 | |
php_ds.c | H A D | 06-Dec-2019 | 2.1 KiB | 100 | 82 | |
php_ds.h | H A D | 19-Dec-2023 | 1.1 KiB | 55 | 41 | |
phpunit.xml | H A D | 12-Oct-2020 | 250 | 11 | 10 | |
sandbox.php | H A D | 03-Sep-2020 | 1,007 | 38 | 30 | |
test.php | H A D | 06-Dec-2019 | 604 | 26 | 15 |
README.md
1# Native Data Structures for PHP 2 3[![Build Status](https://github.com/php-ds/ext-ds/workflows/CI/badge.svg)](https://github.com/php-ds/ext-ds/actions?query=workflow%3A%22CI%22+branch%3Amaster) 4[![Build status](https://ci.appveyor.com/api/projects/status/9w0xitp3q04hdu1d?svg=true)](https://ci.appveyor.com/project/rtheunissen/ext-ds) 5[![PECL](https://img.shields.io/badge/PECL-1.5.0-blue.svg)](https://pecl.php.net/package/ds) 6 7A PHP language extension that provides specialized data structures as efficient alternatives to the PHP array. 8You can read about it in more detail [in this blog post](https://medium.com/p/9dda7af674cd) which highlights the API, performance (relative to PHP 7) and other benefits of using the extension. 9 10## Documentation 11 12Documentation is available on [php.net](http://docs.php.net/manual/en/book.ds.php). You should also include the [polyfill](https://github.com/php-ds/polyfill) in your project for IDE integration. 13 14## Installation 15 16The easiest way to install the extension is to use PECL: 17 18``` 19pecl install ds 20``` 21 22If you're on Windows, you can download a compiled .dll on [PECL](https://pecl.php.net/package/ds) or under [releases](https://github.com/php-ds/extension/releases). 23 24## Enabling the extension 25 26You'll need to add `extension=ds.so` to your primary *php.ini* file. 27 28If you encounter an "undefined symbol" error, see [#2](https://github.com/php-ds/extension/issues/2#issuecomment-181855047). 29 30```bash 31# To see where .ini files are located 32php -i | grep "\.ini" 33``` 34 35--- 36 37You can also enable the extension temporarily using the command line: 38 39```bash 40php -d extension=ds.so 41``` 42 43**Note**: Windows would use php_ds.dll instead. 44 45## Testing 46 47There is a suite of PHPUnit tests that can be installed using [**Composer**](https://getcomposer.org/doc/00-intro.md#installation-linux-unix-osx). 48 49``` bash 50composer install # Install the test suite 51composer test # Run the tests 52composer memtest # Run the tests checking for memory leaks 53``` 54 55## Compatibility 56 57You may include the [polyfill](https://github.com/php-ds/polyfill) as a dependency in your project. This allows your codebase to still function in an environment where the extension is not installed. 58 59## Contributing 60 61For local development, I'm using Docker: 62 63``` 64./dev.sh # opens a shell into a development environment 65 66phpize 67./configure 68make 69make install 70 71composer install 72composer test 73``` 74 75Please see [CONTRIBUTING](CONTRIBUTING.md) for more information. 76 77## Credits 78 79- [Rudi Theunissen](https://github.com/rtheunissen) 80- [Joe Watkins](https://github.com/krakjoe) 81 82## License 83 84The MIT License (MIT). Please see [LICENSE](LICENSE) for more information. 85