<?php
$x = range(0, 100000);
$keys = array_map(function ($x) {
return chr(46+rand(0, 26)) . chr(46+rand(0, 26)) . chr(46+rand(0, 26)) . $x;
}, $x);
$vars = array_combine($keys, $x);
$time = 0.0;
for ($i = $runs = 1000; $i-- > 0;) {
$t = microtime(TRUE);
extract($vars);
$time += microtime(TRUE) - $t;
}
echo sprintf("%.4f", $time / $runs);
- Output for 7.2.3, 7.2.9, 7.2.12 - 7.2.13, 7.3.1
- 0.0014
- Output for 7.2.0, 7.2.2, 7.2.6 - 7.2.8, 7.3.0
- 0.0013
- Output for 7.2.1, 7.2.10 - 7.2.11
- 0.0015
- Output for 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.24 - 5.5.35, 5.6.7 - 5.6.28, 7.0.0 - 7.0.20, 7.1.5 - 7.1.25, 7.2.4 - 7.2.5
Process exited with code 137.- Output for 7.1.0
- 0.0024
- Output for 4.4.2 - 4.4.9, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17
- Parse error: syntax error, unexpected T_FUNCTION, expecting ')' in /in/6dof3 on line 3
Process exited with code 255. - Output for 4.3.0 - 4.3.1, 4.3.5 - 4.3.11, 4.4.0 - 4.4.1, 5.0.0 - 5.0.5
- Parse error: parse error, unexpected T_FUNCTION, expecting ')' in /in/6dof3 on line 3
Process exited with code 255. - Output for 4.3.2 - 4.3.4
- Parse error: parse error, expecting `')'' in /in/6dof3 on line 3
Process exited with code 255.
preferences:
162.12 ms | 401 KiB | 192 Q