3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $n = 1000000; // First a test with a empty array $array = array(); $time_start = microtime(true); $i = 0; while($i < $n){ $devnull = array_key_exists(++$i, $array); } $time_end = microtime(true); $time_while1= $time_end-$time_start; echo number_format($time_while1, 3, '.', '') ." seconds - array_key_exists(array,i) on empty array \n";
Output for 7.1.0
0.045 seconds - array_key_exists(array,i) on empty array
Output for 7.0.14
0.040 seconds - array_key_exists(array,i) on empty array
Output for 7.0.6
0.027 seconds - array_key_exists(array,i) on empty array
Output for 7.0.5
0.038 seconds - array_key_exists(array,i) on empty array
Output for 7.0.3 - 7.0.4
0.035 seconds - array_key_exists(array,i) on empty array
Output for 7.0.2
0.030 seconds - array_key_exists(array,i) on empty array
Output for 7.0.1
0.032 seconds - array_key_exists(array,i) on empty array
Output for 7.0.0
0.025 seconds - array_key_exists(array,i) on empty array
Output for 5.6.28
-0.030 seconds - array_key_exists(array,i) on empty array
Output for 5.4.4, 5.4.7, 5.4.20, 5.4.22, 5.5.25, 5.5.31, 5.5.35, 5.6.21
0.116 seconds - array_key_exists(array,i) on empty array
Output for 5.6.20
0.094 seconds - array_key_exists(array,i) on empty array
Output for 5.5.28, 5.5.30, 5.6.19
0.102 seconds - array_key_exists(array,i) on empty array
Output for 5.5.24, 5.5.34, 5.6.18
0.104 seconds - array_key_exists(array,i) on empty array
Output for 5.6.17
0.109 seconds - array_key_exists(array,i) on empty array
Output for 5.4.6, 5.6.16
0.112 seconds - array_key_exists(array,i) on empty array
Output for 5.4.5, 5.4.16, 5.4.32, 5.6.15
0.115 seconds - array_key_exists(array,i) on empty array
Output for 5.4.8, 5.4.29, 5.6.10, 5.6.14
0.111 seconds - array_key_exists(array,i) on empty array
Output for 5.6.13
0.093 seconds - array_key_exists(array,i) on empty array
Output for 5.6.12
0.092 seconds - array_key_exists(array,i) on empty array
Output for 5.6.11
0.110 seconds - array_key_exists(array,i) on empty array
Output for 5.6.9
0.106 seconds - array_key_exists(array,i) on empty array
Output for 5.6.8
0.101 seconds - array_key_exists(array,i) on empty array
Output for 5.5.27, 5.6.7
0.108 seconds - array_key_exists(array,i) on empty array
Output for 5.3.3, 5.3.9, 5.5.33
0.128 seconds - array_key_exists(array,i) on empty array
Output for 5.4.37, 5.5.32
0.124 seconds - array_key_exists(array,i) on empty array
Output for 5.4.12, 5.5.29
0.118 seconds - array_key_exists(array,i) on empty array
Output for 5.4.1, 5.4.25, 5.5.26
0.113 seconds - array_key_exists(array,i) on empty array
Output for 5.4.45
0.154 seconds - array_key_exists(array,i) on empty array
Output for 5.4.44
0.237 seconds - array_key_exists(array,i) on empty array
Output for 5.4.43
0.162 seconds - array_key_exists(array,i) on empty array
Output for 5.4.42
0.193 seconds - array_key_exists(array,i) on empty array
Output for 5.2.12, 5.4.41
0.153 seconds - array_key_exists(array,i) on empty array
Output for 5.4.40
0.165 seconds - array_key_exists(array,i) on empty array
Output for 5.1.6, 5.2.4, 5.4.39
0.161 seconds - array_key_exists(array,i) on empty array
Output for 5.4.38
0.183 seconds - array_key_exists(array,i) on empty array
Output for 5.4.36
0.212 seconds - array_key_exists(array,i) on empty array
Output for 5.2.13 - 5.2.15, 5.4.11, 5.4.35
0.147 seconds - array_key_exists(array,i) on empty array
Output for 5.4.34
0.185 seconds - array_key_exists(array,i) on empty array
Output for 5.4.27, 5.4.31
0.119 seconds - array_key_exists(array,i) on empty array
Output for 5.4.2, 5.4.10, 5.4.18, 5.4.30
0.117 seconds - array_key_exists(array,i) on empty array
Output for 5.3.16, 5.4.28
0.136 seconds - array_key_exists(array,i) on empty array
Output for 5.4.26
0.164 seconds - array_key_exists(array,i) on empty array
Output for 5.3.5, 5.4.24
0.132 seconds - array_key_exists(array,i) on empty array
Output for 5.4.3, 5.4.14 - 5.4.15, 5.4.23
0.114 seconds - array_key_exists(array,i) on empty array
Output for 5.4.21
0.126 seconds - array_key_exists(array,i) on empty array
Output for 5.4.19
0.120 seconds - array_key_exists(array,i) on empty array
Output for 5.1.0, 5.1.2, 5.4.17
0.140 seconds - array_key_exists(array,i) on empty array
Output for 5.4.13
0.122 seconds - array_key_exists(array,i) on empty array
Output for 5.4.9
0.121 seconds - array_key_exists(array,i) on empty array
Output for 5.4.0
0.144 seconds - array_key_exists(array,i) on empty array
Output for 5.3.6, 5.3.14, 5.3.29
0.133 seconds - array_key_exists(array,i) on empty array
Output for 5.2.0, 5.2.2, 5.2.6, 5.2.9, 5.3.28
0.149 seconds - array_key_exists(array,i) on empty array
Output for 5.3.27
0.134 seconds - array_key_exists(array,i) on empty array
Output for 5.1.4, 5.2.8, 5.2.16, 5.3.26
0.148 seconds - array_key_exists(array,i) on empty array
Output for 5.3.20, 5.3.25
0.141 seconds - array_key_exists(array,i) on empty array
Output for 5.1.5, 5.3.22, 5.3.24
0.143 seconds - array_key_exists(array,i) on empty array
Output for 5.2.10, 5.3.23
0.150 seconds - array_key_exists(array,i) on empty array
Output for 5.3.7, 5.3.21
0.145 seconds - array_key_exists(array,i) on empty array
Output for 5.1.3, 5.3.12 - 5.3.13, 5.3.19
0.137 seconds - array_key_exists(array,i) on empty array
Output for 5.3.18
0.135 seconds - array_key_exists(array,i) on empty array
Output for 5.3.1, 5.3.4, 5.3.17
0.131 seconds - array_key_exists(array,i) on empty array
Output for 5.3.15
0.146 seconds - array_key_exists(array,i) on empty array
Output for 5.3.11
0.139 seconds - array_key_exists(array,i) on empty array
Output for 5.3.10
0.176 seconds - array_key_exists(array,i) on empty array
Output for 5.3.0, 5.3.8
0.129 seconds - array_key_exists(array,i) on empty array
Output for 5.3.2
0.130 seconds - array_key_exists(array,i) on empty array
Output for 5.2.17
0.160 seconds - array_key_exists(array,i) on empty array
Output for 5.2.11
0.156 seconds - array_key_exists(array,i) on empty array
Output for 5.2.3, 5.2.7
0.152 seconds - array_key_exists(array,i) on empty array
Output for 5.2.5
0.155 seconds - array_key_exists(array,i) on empty array
Output for 5.2.1
0.172 seconds - array_key_exists(array,i) on empty array
Output for 5.1.1
0.142 seconds - array_key_exists(array,i) on empty array
Output for 5.0.5
0.401 seconds - array_key_exists(array,i) on empty array
Output for 5.0.4
0.391 seconds - array_key_exists(array,i) on empty array
Output for 5.0.3
0.331 seconds - array_key_exists(array,i) on empty array
Output for 5.0.2
0.395 seconds - array_key_exists(array,i) on empty array
Output for 5.0.1
0.355 seconds - array_key_exists(array,i) on empty array
Output for 5.0.0
0.351 seconds - array_key_exists(array,i) on empty array
Output for 4.3.9, 4.4.9
0.372 seconds - array_key_exists(array,i) on empty array
Output for 4.4.8
-0.638 seconds - array_key_exists(array,i) on empty array
Output for 4.4.7
0.384 seconds - array_key_exists(array,i) on empty array
Output for 4.4.6
0.358 seconds - array_key_exists(array,i) on empty array
Output for 4.4.5
-0.614 seconds - array_key_exists(array,i) on empty array
Output for 4.4.4
0.367 seconds - array_key_exists(array,i) on empty array
Output for 4.4.3
-0.603 seconds - array_key_exists(array,i) on empty array
Output for 4.4.2
0.408 seconds - array_key_exists(array,i) on empty array
Output for 4.4.1
0.402 seconds - array_key_exists(array,i) on empty array
Output for 4.4.0
-0.608 seconds - array_key_exists(array,i) on empty array
Output for 4.3.11
0.378 seconds - array_key_exists(array,i) on empty array
Output for 4.3.10
-0.628 seconds - array_key_exists(array,i) on empty array
Output for 4.3.8
0.414 seconds - array_key_exists(array,i) on empty array
Output for 4.3.7
-0.611 seconds - array_key_exists(array,i) on empty array
Output for 4.3.6
0.380 seconds - array_key_exists(array,i) on empty array
Output for 4.3.5
-0.598 seconds - array_key_exists(array,i) on empty array
Output for 4.3.4
0.364 seconds - array_key_exists(array,i) on empty array
Output for 4.3.3
-0.612 seconds - array_key_exists(array,i) on empty array
Output for 4.3.2
0.362 seconds - array_key_exists(array,i) on empty array
Output for 4.3.1
0.368 seconds - array_key_exists(array,i) on empty array
Output for 4.3.0
0.509 seconds - array_key_exists(array,i) on empty array