php-ds/ext-ds 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

php-ds/ext-ds

最新稳定版本:v1.6.0

Composer 安装命令:

pie install php-ds/ext-ds

包简介

An extension providing efficient internal data structures as an alternative to arrays

README 文档

README

Build Status Build status PECL

A PHP language extension that provides 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 (relative to PHP 7) 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

For local development, I'm using Docker:

./dev.sh  # opens a shell into a development environment

phpize
./configure
make
make install

composer install
composer test

Please see CONTRIBUTING for more information.

Credits

License

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

统计信息

  • 总下载量: 337
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2149
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2149
  • Watchers: 84
  • Forks: 98
  • 开发语言: C

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-06-19