cef8fcc6e3
This is a pure PHP implementation of ArrayObject. It does't match the reference semantics of zend's implementation, but it is much easier to build this in pure PHP, so its a good first step. It is better to have it like this, than to not have it at all.
14 linhas
256 B
PHP
14 linhas
256 B
PHP
<?php
|
|
$array = array("img12.png", "img10.png", "img2.png", "img1.png");
|
|
|
|
$arr1 = new ArrayObject($array);
|
|
$arr2 = clone $arr1;
|
|
|
|
$arr1->asort();
|
|
echo "Standard sorting\n";
|
|
print_r($arr1);
|
|
|
|
$arr2->natsort();
|
|
echo "\nNatural order sorting\n";
|
|
print_r($arr2);
|