PHP7数据结构

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

Github星跟踪图

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.

主要指标

概览
名称与所有者php-ds/ext-ds
主编程语言C
编程语言C (语言数: 6)
平台
许可证MIT License
所有者活动
创建于2016-02-01 08:05:07
推送于2025-05-02 16:41:49
最后一次提交2025-05-02 09:41:19
发布数28
最新版本名称v1.6.0 (发布于 )
第一版名称v1.0.2 (发布于 )
用户参与
星数2.1k
关注者数86
派生数96
提交数481
已启用问题?
问题数150
打开的问题数26
拉请求数53
打开的拉请求数0
关闭的拉请求数10
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?