You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Documentation is available on [php.net](http://docs.php.net/manual/en/book.ds.php). You can include the [polyfill](https://github.com/php-ds/polyfill) in your project for IDE integration and autocomplete support. The polyfill will not be loaded if the extension is enabled, but it's still useful to have the PHP source in your working directory.
10
+
11
+
## Installation
12
+
13
+
The easiest way to install the extension is to use PECL:
14
+
15
+
```
16
+
pecl install ds
17
+
```
8
18
9
-
[**Blog post**](https://medium.com/@rtheunissen/efficient-data-structures-for-php-7-9dda7af674cd) that covers the behaviour and performance benefits of each data structure.
If you're on Windows, you can [download a compiled .dll on PECL](https://pecl.php.net/package/ds).
41
+
## Enable
35
42
36
-
The best way to enable the extension is to create an *ini* file.
43
+
You'll need to add `extension=ds.so` (or .dll if you're on Windows) to your primary *ini* file.
44
+
You can also create a separate *ini* file for the extension, which allows you to control load order.
37
45
38
46
```bash
39
47
# To see where additional .ini files are located
@@ -51,20 +59,20 @@ You can also enable the extension temporarily using the command line:
51
59
php -d extension=ds.so
52
60
```
53
61
54
-
###Testing
62
+
## Testing
55
63
56
64
There is a suite of PHPUnit tests that can be installed using [**Composer**](https://getcomposer.org/doc/00-intro.md#installation-linux-unix-osx).
57
65
58
-
The extension has to be installed to run the tests.
59
-
60
-
#### Running the tests
61
-
62
66
```bash
63
67
composer install
64
68
composer test
65
69
```
66
70
67
-
### Contributing
71
+
## Compatibility
72
+
73
+
It's highly recommended that you 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.
74
+
75
+
## Contributing
68
76
69
77
Please see [CONTRIBUTING](CONTRIBUTING.md) for more information.
0 commit comments