PHP7数据结构

为PHP7提供高效数据结构的扩展。「An extension providing efficient data structures for PHP 7」

Github stars Tracking Chart

Data Structures for PHP 7

Build Status
Build status
PECL

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.

Documentation

Documentation is available on php.net. You should also include the polyfill in your project for IDE integration.

Installation

The easiest way to install the extension is to use PECL:

pecl install ds

If you're on Windows, you can download a compiled .dll on PECL or under releases.

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.

Testing

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

Compatibility

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.

Contributing

Please see CONTRIBUTING for more information.

Credits

License

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

Main metrics

Overview
Name With Ownerphp-ds/ext-ds
Primary LanguageC
Program languageC (Language Count: 6)
Platform
License:MIT License
所有者活动
Created At2016-02-01 08:05:07
Pushed At2025-05-02 16:41:49
Last Commit At2025-05-02 09:41:19
Release Count28
Last Release Namev1.6.0 (Posted on )
First Release Namev1.0.2 (Posted on )
用户参与
Stargazers Count2.1k
Watchers Count87
Fork Count96
Commits Count481
Has Issues Enabled
Issues Count150
Issue Open Count26
Pull Requests Count53
Pull Requests Open Count0
Pull Requests Close Count10
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private