alirezasalehizadeh/quick-array 问题修复 & 功能扩展

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

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

alirezasalehizadeh/quick-array

最新稳定版本:v1.1.0

Composer 安装命令:

composer require alirezasalehizadeh/quick-array

包简介

Simple PHP tool to quickly work with SplFixedArray.

README 文档

README

Work with SplFixedArray class quickly!

Features

  • Simple and Easy to use
  • Due to the use of SplFixedArray, it is faster than normal array

Requirements

PHP >= 8.1

Installation

via Composer:

composer require alirezasalehizadeh/quick-array

Usage

Methods Table:

$arr = new QuickArray(5);


$arr->__construct(int $size)  // Constructs a new fixed array

$arr->size():int  // Returns the size of the array

$arr->current():mixed // Return current array entry

$arr->push($index, $value)  // Push new element to QuickArray

$arr->pushArray(array $array, bool $preserveKeys = true):(new SplFixedArray)  // Import a PHP array in a SplFixedArray instance

$arr->key():int // Return current array index

$arr->next():void  // Move to next entry

$arr->exists($index):bool // Returns whether the requested index exists

$arr->get($index) // Returns the value at the specified index

$arr->set($index, $value) // Sets a new value at a specified index

$arr->unset($index) // Unsets the value at the specified $index

$arr->rewind()  // Rewind iterator back to the start

$arr->resize(int $size):bool  // Change the size of an array

$arr->toArray() // Returns a PHP array from the fixed array

$arr->valid():bool // Check whether the array contains more elements

$arr->each($callback):array // Applies the callback to the elements of the array

$arr->__wakeup()  // Reinitialises the array after being unserialised

Contributing

Send pull request or open issue for contributing.

License

MIT.

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-03-10

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固