Name Date Size #Lines LOC

..03-Nov-2024-

.github/workflows/H06-Oct-2021-

src/H29-Jul-2023-

.editorconfigH A D06-Dec-2019244 139

.gitignoreH A D18-Dec-2023474 5252

.valgrindrcH A D06-Dec-201984 43

CHANGELOG.mdH A D19-Oct-20213 KiB130101

CONTRIBUTING.mdH A D06-Dec-20191.1 KiB2211

DockerfileH A D18-Dec-2023136 53

LICENSEH A D06-Dec-20191.1 KiB2117

README.mdH A D19-Dec-20232.6 KiB8553

appveyor.ymlH A D19-Dec-20233 KiB10270

composer.jsonH A D19-Dec-2023450 2019

config.m4H A D06-Dec-20193.4 KiB8175

config.w32H A D09-Nov-20202.3 KiB10088

dev.shH A D18-Dec-202384 31

docker-compose.ymlH A D18-Dec-2023166 88

ext-ds.iniH A D18-Dec-202315 11

package.xmlH A D19-Dec-20238.2 KiB168162

php_ds.cH A D06-Dec-20192.1 KiB10082

php_ds.hH A D19-Dec-20231.1 KiB5541

phpunit.xmlH A D12-Oct-2020250 1110

sandbox.phpH A D03-Sep-20201,007 3830

test.phpH A D06-Dec-2019604 2615

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