<?php
function getRandomStr($length){
return substr(str_shuffle("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"), 0, $length);
}
function put(&$mixed, $key, $value) {
if (is_array($mixed)) {
$mixed[$key] = $value;
} else {
// Do something else which we don't care about here
}
}
$start = microtime(true);
$mixed = array();
for($i = 0; $i < 10000; $i++) {
put($mixed, getRandomStr(15), 'abcd');
}
print round(microtime(true) - $start, 2) . 's';
- Output for 7.0.0 - 7.0.33, 7.1.3 - 7.1.4, 7.1.7, 7.1.15, 7.1.17 - 7.1.18, 7.1.20 - 7.1.22, 7.1.25 - 7.1.27, 7.1.29 - 7.1.33, 7.2.0 - 7.2.26, 7.3.1, 7.3.4, 7.3.6 - 7.3.7, 7.3.10 - 7.3.11, 7.3.13, 7.4.1
- 0.02s
- Output for 7.3.0, 7.3.2 - 7.3.3, 7.3.5, 7.3.8 - 7.3.9, 7.3.12, 7.4.0
- 0.01s
- Output for 7.1.0 - 7.1.2, 7.1.5 - 7.1.6, 7.1.8 - 7.1.14, 7.1.16, 7.1.19, 7.1.23 - 7.1.24, 7.1.28
- 0.03s
- Output for 4.3.0 - 4.3.11, 4.4.0 - 4.4.9, 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.40
Process exited with code 137.
preferences:
178.83 ms | 403 KiB | 325 Q