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?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?