PHP 8.5.0 Alpha 1 available for testing

Voting

: max(seven, two)?
(Example: nine)

The Note You're Voting On

77931774 at qq dot com
3 years ago
$list = new SplDoublyLinkedList();

for ($i = 0; $i < 2000001; $i++) {
$list->push($i);
}

$s = microtime(true);

//$res = $list->offsetGet(2000000); // spend 7 ms
$res = $list->offsetGet(0); // spend 0.07 ms
var_dump($res);

$e = microtime(true);

echo ($e - $s) * 1000;

<< Back to user notes page

To Top