<?php
$n = 1000000;
// Create test array
$i = 0;
$array = array();
while($i < $n) {
$array[$i++] = true;
}
$time_start = microtime(true);
$i = 0;
while ($i < $n) {
$devnull = isset($array[$i++]);
}
$time_end = microtime(true);
$time_while1= $time_end-$time_start;
echo number_format($time_while1, 3, '.', '')
." seconds - isset(array[i]) on full array \n";
- Output for 7.1.7
- 0.023 seconds - isset(array[i]) on full array
- Output for 7.1.6
- 0.026 seconds - isset(array[i]) on full array
- Output for 7.0.1, 7.0.3, 7.0.5, 7.1.5
- 0.017 seconds - isset(array[i]) on full array
- Output for 7.1.0
- -0.025 seconds - isset(array[i]) on full array
- Output for 7.0.20
- 0.027 seconds - isset(array[i]) on full array
- Output for 7.0.14
- 0.018 seconds - isset(array[i]) on full array
- Output for 7.0.4, 7.0.6
- 0.015 seconds - isset(array[i]) on full array
- Output for 7.0.0, 7.0.2
- 0.014 seconds - isset(array[i]) on full array
- 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
- Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 32 bytes) in /in/dfp9d on line 9
Process exited with code 255. - Output for 5.2.2, 5.2.6 - 5.2.17
- Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 71 bytes) in /in/dfp9d on line 9
Process exited with code 255. - Output for 5.2.1, 5.2.3 - 5.2.5
- Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 24 bytes) in /in/dfp9d on line 9
Process exited with code 255. - Output for 5.2.0
- 0.090 seconds - isset(array[i]) on full array
- Output for 5.1.6
- 0.056 seconds - isset(array[i]) on full array
- Output for 5.1.3, 5.1.5
- 0.060 seconds - isset(array[i]) on full array
- Output for 5.1.4
- 0.063 seconds - isset(array[i]) on full array
- Output for 5.1.2
- 0.059 seconds - isset(array[i]) on full array
- Output for 5.1.1
- 0.087 seconds - isset(array[i]) on full array
- Output for 5.1.0
- 0.089 seconds - isset(array[i]) on full array
- Output for 5.0.5
- 0.176 seconds - isset(array[i]) on full array
- Output for 5.0.4
- 0.310 seconds - isset(array[i]) on full array
- Output for 5.0.3
- 0.309 seconds - isset(array[i]) on full array
- Output for 5.0.0, 5.0.2
- 0.162 seconds - isset(array[i]) on full array
- Output for 5.0.1
- 0.317 seconds - isset(array[i]) on full array
- Output for 4.4.9
- -0.807 seconds - isset(array[i]) on full array
- Output for 4.3.11, 4.4.8
- 0.170 seconds - isset(array[i]) on full array
- Output for 4.4.7
- 0.177 seconds - isset(array[i]) on full array
- Output for 4.4.6
- -0.818 seconds - isset(array[i]) on full array
- Output for 4.4.5
- 0.181 seconds - isset(array[i]) on full array
- Output for 4.4.4
- 0.174 seconds - isset(array[i]) on full array
- Output for 4.3.8, 4.4.3
- 0.180 seconds - isset(array[i]) on full array
- Output for 4.4.2
- 0.183 seconds - isset(array[i]) on full array
- Output for 4.4.1
- 0.187 seconds - isset(array[i]) on full array
- Output for 4.4.0
- -0.822 seconds - isset(array[i]) on full array
- Output for 4.3.10
- 0.172 seconds - isset(array[i]) on full array
- Output for 4.3.9
- 0.171 seconds - isset(array[i]) on full array
- Output for 4.3.7
- 0.167 seconds - isset(array[i]) on full array
- Output for 4.3.6
- -0.746 seconds - isset(array[i]) on full array
- Output for 4.3.5
- 0.179 seconds - isset(array[i]) on full array
- Output for 4.3.4
- 0.173 seconds - isset(array[i]) on full array
- Output for 4.3.3
- -0.831 seconds - isset(array[i]) on full array
- Output for 4.3.2
- 0.168 seconds - isset(array[i]) on full array
- Output for 4.3.1
- 0.175 seconds - isset(array[i]) on full array
- Output for 4.3.0
- 0.169 seconds - isset(array[i]) on full array
preferences:
163.81 ms | 401 KiB | 174 Q