3v4l.org

run code in 300+ PHP versions simultaneously
<?php $i=0; $j=500000; while($i < 90000) { $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.015 seconds and returned 90000 entries
Output for 7.1.7
Starting array_diff array_diff() took 0.013 seconds and returned 90000 entries
Output for 7.1.6
Starting array_diff array_diff() took 0.019 seconds and returned 90000 entries
Output for 7.1.5
Starting array_diff array_diff() took 0.796 seconds and returned 90000 entries
Output for 7.1.0
Starting array_diff array_diff() took 0.017 seconds and returned 90000 entries
Output for 7.0.20
Starting array_diff array_diff() took 0.183 seconds and returned 90000 entries
Output for 7.0.14
Starting array_diff array_diff() took 0.016 seconds and returned 90000 entries
Output for 7.0.12
Starting array_diff array_diff() took 0.018 seconds and returned 90000 entries
Output for 5.6.28
Starting array_diff array_diff() took 0.023 seconds and returned 90000 entries
Output for 5.3.6 - 5.3.7, 5.3.10, 5.3.12, 5.3.22, 5.3.27, 5.4.30, 5.4.42 - 5.4.43, 5.4.45
Starting array_diff array_diff() took 0.238 seconds and returned 90000 entries
Output for 5.4.21, 5.4.28, 5.4.44
Starting array_diff array_diff() took 0.267 seconds and returned 90000 entries
Output for 5.3.4, 5.4.7, 5.4.13, 5.4.41
Starting array_diff array_diff() took 0.239 seconds and returned 90000 entries
Output for 5.4.40
Starting array_diff array_diff() took 0.291 seconds and returned 90000 entries
Output for 5.4.39
Starting array_diff array_diff() took 0.257 seconds and returned 90000 entries
Output for 5.4.25, 5.4.38
Starting array_diff array_diff() took 0.253 seconds and returned 90000 entries
Output for 5.3.14, 5.4.37
Starting array_diff array_diff() took 0.245 seconds and returned 90000 entries
Output for 5.4.36
Starting array_diff array_diff() took 0.260 seconds and returned 90000 entries
Output for 5.4.35
Starting array_diff array_diff() took 0.259 seconds and returned 90000 entries
Output for 5.4.34
Starting array_diff array_diff() took 0.297 seconds and returned 90000 entries
Output for 5.4.32
Starting array_diff array_diff() took 0.314 seconds and returned 90000 entries
Output for 5.4.31
Starting array_diff array_diff() took 0.242 seconds and returned 90000 entries
Output for 5.4.29
Starting array_diff array_diff() took 0.236 seconds and returned 90000 entries
Output for 5.4.2 - 5.4.3, 5.4.23, 5.4.27
Starting array_diff array_diff() took 0.268 seconds and returned 90000 entries
Output for 5.4.16, 5.4.26
Starting array_diff array_diff() took 0.265 seconds and returned 90000 entries
Output for 5.4.1, 5.4.24
Starting array_diff array_diff() took 0.234 seconds and returned 90000 entries
Output for 5.4.22
Starting array_diff array_diff() took 0.305 seconds and returned 90000 entries
Output for 5.4.20
Starting array_diff array_diff() took 0.271 seconds and returned 90000 entries
Output for 5.4.19
Starting array_diff array_diff() took 0.263 seconds and returned 90000 entries
Output for 5.3.19, 5.4.18
Starting array_diff array_diff() took 0.266 seconds and returned 90000 entries
Output for 5.4.17
Starting array_diff array_diff() took 0.275 seconds and returned 90000 entries
Output for 5.4.15
Starting array_diff array_diff() took 0.270 seconds and returned 90000 entries
Output for 5.4.14
Starting array_diff array_diff() took 0.262 seconds and returned 90000 entries
Output for 5.4.12
Starting array_diff array_diff() took 0.264 seconds and returned 90000 entries
Output for 5.4.11
Starting array_diff array_diff() took 0.249 seconds and returned 90000 entries
Output for 5.4.10
Starting array_diff array_diff() took 0.272 seconds and returned 90000 entries
Output for 5.4.9
Starting array_diff array_diff() took 0.290 seconds and returned 90000 entries
Output for 5.4.8
Starting array_diff array_diff() took 0.241 seconds and returned 90000 entries
Output for 5.4.6
Starting array_diff array_diff() took 0.237 seconds and returned 90000 entries
Output for 5.3.5, 5.4.5
Starting array_diff array_diff() took 0.235 seconds and returned 90000 entries
Output for 5.4.4
Starting array_diff array_diff() took 0.269 seconds and returned 90000 entries
Output for 5.4.0
Starting array_diff array_diff() took 0.232 seconds and returned 90000 entries
Output for 5.3.29
Starting array_diff array_diff() took 0.219 seconds and returned 90000 entries
Output for 5.3.28
Starting array_diff array_diff() took 0.223 seconds and returned 90000 entries
Output for 5.3.13, 5.3.20, 5.3.24 - 5.3.26
Starting array_diff array_diff() took 0.240 seconds and returned 90000 entries
Output for 5.3.23
Starting array_diff array_diff() took 0.217 seconds and returned 90000 entries
Output for 5.3.21
Starting array_diff array_diff() took 0.231 seconds and returned 90000 entries
Output for 5.3.11, 5.3.18
Starting array_diff array_diff() took 0.210 seconds and returned 90000 entries
Output for 5.3.16 - 5.3.17
Starting array_diff array_diff() took 0.213 seconds and returned 90000 entries
Output for 5.3.9, 5.3.15
Starting array_diff array_diff() took 0.214 seconds and returned 90000 entries
Output for 5.3.8
Starting array_diff array_diff() took 0.229 seconds and returned 90000 entries
Output for 5.3.0 - 5.3.3
Starting array_diff
Process exited with code 137.

preferences:
108.98 ms | 401 KiB | 89 Q