2017 © Pedro Peláez
 

library indexed-array

Rewrite from SplFixedArray,it can use as the indexed array.

image

qiuqiux/indexed-array

Rewrite from SplFixedArray,it can use as the indexed array.

  • Wednesday, October 18, 2017
  • by qiuqiuX
  • Repository
  • 1 Watchers
  • 1 Stars
  • 34 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

IndexArray

modify from SplFixedArray that can use as array., (*1)

Examples:

$a = new IndexedArray();

$a[] = 'a';
$a[] = 'b';
$a[] = 'b';
$a->pop();
$a->shift();
foreach ($a as $val) {
    echo $val;
}

echo count($a);      // 1

$a[] = 'd';         // $a[1] = 'd';

$indexedArray1 = new IndexedArray();
$indexedArray2 = new IndexedArray();
$max = 1000000;
for ($i = 0; $i < $max; ++$i) {
    $indexedArray1[] = $i;
    $indexedArray2[] = $max + $i;
}

echo $indexedArray1->merge($indexedArray2)->getSize();

API

  • createFormArray
  • createFromFixedArray
  • pop
  • push
  • shift
  • unshift
  • unique
  • last
  • search
  • transform
  • reverse
  • merge
  • getSize
  • toJson
  • toArray

The Versions

18/10 2017

dev-master

9999999-dev

Rewrite from SplFixedArray,it can use as the indexed array.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

array splfixedarray indexarray indexed-array

06/07 2016

v1.0.1

1.0.1.0

Rewrite from SplFixedArray,it can use as the indexed array.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

array splfixedarray indexarray indexed-array

07/06 2016

v1.0.0

1.0.0.0

Rewrite from SplFixedArray,it can use as the indexed array.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

array splfixedarray indexarray indexed-array