- var_dump: documentation ( source)
- microtime: documentation ( source)
- array_reverse: documentation ( source)
- array_shift: documentation ( source)
- array_fill: documentation ( source)
- array_pop: documentation ( source)
<?php
$a = $b = array_fill(0, 500, 'sucks');
$t = microtime(true);
$c = array_reverse($a);
while($c) {
array_pop($c);
}
var_dump(microtime(true) - $t);
$t = microtime(true);
while($b) {
array_shift($b);
}
var_dump(microtime(true) - $t);