3v4l.org

run code in 300+ PHP versions simultaneously
<?php $i=0; $j=50000; while($i < 50000) { $i++; $j++; $data1[] = md5($i); $data2[] = md5($j); } $time = microtime(true); echo "Starting array_diff\n"; $data_diff1 = array_diff($data1, $data2); $time = microtime(true) - $time; echo 'array_diff() took ' . number_format($time, 3) . ' seconds and returned ' . count($data_diff1) . " entries\n";
Output for 7.2.0
Starting array_diff array_diff() took 0.007 seconds and returned 50000 entries
Output for 7.1.5, 7.1.7
Starting array_diff array_diff() took 0.009 seconds and returned 50000 entries
Output for 7.1.6
Starting array_diff array_diff() took 0.013 seconds and returned 50000 entries
Output for 7.0.20
Starting array_diff array_diff() took 0.027 seconds and returned 50000 entries
Output for 5.4.8, 5.4.26, 5.4.28
Starting array_diff array_diff() took 0.231 seconds and returned 50000 entries
Output for 5.4.27
Starting array_diff array_diff() took 0.327 seconds and returned 50000 entries
Output for 5.4.25
Starting array_diff array_diff() took 0.332 seconds and returned 50000 entries
Output for 5.4.24
Starting array_diff array_diff() took 0.246 seconds and returned 50000 entries
Output for 5.4.23
Starting array_diff array_diff() took 0.186 seconds and returned 50000 entries
Output for 5.4.22
Starting array_diff array_diff() took 0.292 seconds and returned 50000 entries
Output for 5.4.21
Starting array_diff array_diff() took 0.355 seconds and returned 50000 entries
Output for 5.4.20
Starting array_diff array_diff() took 0.258 seconds and returned 50000 entries
Output for 5.4.19
Starting array_diff array_diff() took 0.320 seconds and returned 50000 entries
Output for 5.4.18
Starting array_diff array_diff() took 0.234 seconds and returned 50000 entries
Output for 5.4.17
Starting array_diff array_diff() took 0.325 seconds and returned 50000 entries
Output for 5.4.16
Starting array_diff array_diff() took 0.180 seconds and returned 50000 entries
Output for 5.4.15
Starting array_diff array_diff() took 0.184 seconds and returned 50000 entries
Output for 5.4.14
Starting array_diff array_diff() took 0.163 seconds and returned 50000 entries
Output for 5.3.23, 5.4.13
Starting array_diff array_diff() took 0.185 seconds and returned 50000 entries
Output for 5.3.26, 5.4.12
Starting array_diff array_diff() took 0.170 seconds and returned 50000 entries
Output for 5.4.11
Starting array_diff array_diff() took 0.160 seconds and returned 50000 entries
Output for 5.4.10
Starting array_diff array_diff() took 0.240 seconds and returned 50000 entries
Output for 5.4.9
Starting array_diff array_diff() took 0.229 seconds and returned 50000 entries
Output for 5.4.7
Starting array_diff array_diff() took 0.161 seconds and returned 50000 entries
Output for 5.4.6
Starting array_diff array_diff() took 0.192 seconds and returned 50000 entries
Output for 5.4.0, 5.4.5
Starting array_diff array_diff() took 0.222 seconds and returned 50000 entries
Output for 5.4.2, 5.4.4
Starting array_diff array_diff() took 0.207 seconds and returned 50000 entries
Output for 5.4.3
Starting array_diff array_diff() took 0.220 seconds and returned 50000 entries
Output for 5.3.8, 5.4.1
Starting array_diff array_diff() took 0.204 seconds and returned 50000 entries
Output for 5.3.27 - 5.3.28
Starting array_diff array_diff() took 0.199 seconds and returned 50000 entries
Output for 5.3.19, 5.3.25
Starting array_diff array_diff() took 0.158 seconds and returned 50000 entries
Output for 5.3.22, 5.3.24
Starting array_diff array_diff() took 0.165 seconds and returned 50000 entries
Output for 5.3.21
Starting array_diff array_diff() took 0.177 seconds and returned 50000 entries
Output for 5.3.20
Starting array_diff array_diff() took 0.173 seconds and returned 50000 entries
Output for 5.3.18
Starting array_diff array_diff() took 0.169 seconds and returned 50000 entries
Output for 5.3.17
Starting array_diff array_diff() took 0.178 seconds and returned 50000 entries
Output for 5.3.16
Starting array_diff array_diff() took 0.155 seconds and returned 50000 entries
Output for 5.3.15
Starting array_diff array_diff() took 0.152 seconds and returned 50000 entries
Output for 5.3.14
Starting array_diff array_diff() took 0.209 seconds and returned 50000 entries
Output for 5.3.13
Starting array_diff array_diff() took 0.187 seconds and returned 50000 entries
Output for 5.3.12
Starting array_diff array_diff() took 0.183 seconds and returned 50000 entries
Output for 5.3.11
Starting array_diff array_diff() took 0.154 seconds and returned 50000 entries
Output for 5.3.10
Starting array_diff array_diff() took 0.139 seconds and returned 50000 entries
Output for 5.3.9
Starting array_diff array_diff() took 0.134 seconds and returned 50000 entries
Output for 5.3.7
Starting array_diff array_diff() took 0.188 seconds and returned 50000 entries

preferences:
69.76 ms | 401 KiB | 61 Q