3v4l.org

run code in 300+ PHP versions simultaneously
<?php $i=0; $j=500000; while($i < 60000) { $i++; $j++; $data1[] = md5($i); $data2[] = md5($j); } $time = microtime(true); echo "Starting array_diff\n"; for ($i = 0; $i < 100; $i++) { $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.4.1
Starting array_diff array_diff() took 1.380 seconds and returned 60000 entries
Output for 7.4.0
Starting array_diff array_diff() took 1.397 seconds and returned 60000 entries
Output for 7.3.13
Starting array_diff array_diff() took 1.774 seconds and returned 60000 entries
Output for 7.3.12
Starting array_diff array_diff() took 1.799 seconds and returned 60000 entries
Output for 7.3.11
Starting array_diff array_diff() took 1.736 seconds and returned 60000 entries
Output for 7.3.10
Starting array_diff array_diff() took 1.393 seconds and returned 60000 entries
Output for 7.3.9
Starting array_diff array_diff() took 1.701 seconds and returned 60000 entries
Output for 7.3.8
Starting array_diff array_diff() took 1.674 seconds and returned 60000 entries
Output for 7.3.7
Starting array_diff array_diff() took 1.732 seconds and returned 60000 entries
Output for 7.3.6
Starting array_diff array_diff() took 1.752 seconds and returned 60000 entries
Output for 7.3.5
Starting array_diff array_diff() took 1.757 seconds and returned 60000 entries
Output for 7.3.4
Starting array_diff array_diff() took 1.459 seconds and returned 60000 entries
Output for 7.3.3
Starting array_diff array_diff() took 1.497 seconds and returned 60000 entries
Output for 7.3.2
Starting array_diff array_diff() took 1.314 seconds and returned 60000 entries
Output for 7.3.1
Starting array_diff array_diff() took 1.408 seconds and returned 60000 entries
Output for 7.3.0
Starting array_diff array_diff() took 1.434 seconds and returned 60000 entries
Output for 7.2.26
Starting array_diff array_diff() took 1.978 seconds and returned 60000 entries
Output for 7.2.25
Starting array_diff array_diff() took 1.659 seconds and returned 60000 entries
Output for 7.2.24
Starting array_diff array_diff() took 2.059 seconds and returned 60000 entries
Output for 7.2.23
Starting array_diff array_diff() took 1.897 seconds and returned 60000 entries
Output for 7.1.29, 7.2.22
Starting array_diff array_diff() took 1.931 seconds and returned 60000 entries
Output for 7.2.21
Starting array_diff array_diff() took 1.763 seconds and returned 60000 entries
Output for 7.2.20
Starting array_diff array_diff() took 2.108 seconds and returned 60000 entries
Output for 7.2.19
Starting array_diff array_diff() took 1.821 seconds and returned 60000 entries
Output for 7.2.18
Starting array_diff array_diff() took 1.915 seconds and returned 60000 entries
Output for 7.1.33, 7.2.17
Starting array_diff array_diff() took 1.814 seconds and returned 60000 entries
Output for 7.2.16
Starting array_diff array_diff() took 1.444 seconds and returned 60000 entries
Output for 7.2.15
Starting array_diff array_diff() took 1.405 seconds and returned 60000 entries
Output for 7.2.14
Starting array_diff array_diff() took 1.338 seconds and returned 60000 entries
Output for 7.2.13
Starting array_diff array_diff() took 1.398 seconds and returned 60000 entries
Output for 7.2.12
Starting array_diff array_diff() took 1.546 seconds and returned 60000 entries
Process exited with code 137.
Output for 7.2.11
Starting array_diff array_diff() took 1.643 seconds and returned 60000 entries
Process exited with code 137.
Output for 7.2.10
Starting array_diff array_diff() took 1.525 seconds and returned 60000 entries
Output for 5.5.31, 5.6.20, 5.6.32 - 5.6.33, 7.0.0, 7.0.10, 7.0.12 - 7.0.15, 7.0.22, 7.0.24, 7.1.0, 7.1.2, 7.1.5, 7.1.13 - 7.1.14, 7.1.17 - 7.1.18, 7.1.20, 7.2.9

Process exited with code 137.
Output for 5.4.0 - 5.4.45, 5.5.0 - 5.5.30, 5.5.32 - 5.5.38, 5.6.0 - 5.6.19, 5.6.21 - 5.6.31, 5.6.34 - 5.6.40, 7.0.2 - 7.0.3, 7.0.9, 7.0.11, 7.0.19, 7.0.21, 7.0.23, 7.0.33, 7.1.1, 7.1.4, 7.1.6, 7.1.12, 7.1.15, 7.2.1, 7.2.4 - 7.2.5, 7.2.8
Starting array_diff
Process exited with code 137.
Output for 7.0.27, 7.2.7
Starting array_diff array_diff() took 0.921 seconds and returned 60000 entries
Output for 7.2.6
Starting array_diff array_diff() took 0.758 seconds and returned 60000 entries
Output for 7.2.3
Starting array_diff array_diff() took 1.206 seconds and returned 60000 entries
Output for 7.2.2
Starting array_diff array_diff() took 1.019 seconds and returned 60000 entries
Process exited with code 137.
Output for 7.2.0
Starting array_diff array_diff() took 0.951 seconds and returned 60000 entries
Output for 7.1.32
Starting array_diff array_diff() took 1.839 seconds and returned 60000 entries
Output for 7.1.31
Starting array_diff array_diff() took 1.599 seconds and returned 60000 entries
Output for 7.1.30
Starting array_diff array_diff() took 1.889 seconds and returned 60000 entries
Output for 7.1.28
Starting array_diff array_diff() took 1.394 seconds and returned 60000 entries
Output for 7.1.27
Starting array_diff array_diff() took 1.519 seconds and returned 60000 entries
Output for 7.1.26
Starting array_diff array_diff() took 1.471 seconds and returned 60000 entries
Output for 7.1.25
Starting array_diff array_diff() took 1.460 seconds and returned 60000 entries
Output for 7.1.24
Starting array_diff array_diff() took 1.486 seconds and returned 60000 entries
Output for 7.1.23
Starting array_diff array_diff() took 1.483 seconds and returned 60000 entries
Output for 7.1.22
Starting array_diff array_diff() took 1.622 seconds and returned 60000 entries
Output for 7.1.21
Starting array_diff array_diff() took 0.665 seconds and returned 60000 entries
Output for 7.1.19
Starting array_diff array_diff() took 0.918 seconds and returned 60000 entries
Output for 7.1.16
Starting array_diff array_diff() took 1.266 seconds and returned 60000 entries
Process exited with code 137.
Output for 7.1.11
Starting array_diff array_diff() took 0.879 seconds and returned 60000 entries
Output for 7.1.10
Starting array_diff array_diff() took 0.595 seconds and returned 60000 entries
Output for 7.1.9
Starting array_diff array_diff() took 0.553 seconds and returned 60000 entries
Output for 7.1.8
Starting array_diff array_diff() took 0.781 seconds and returned 60000 entries
Output for 7.1.7
Starting array_diff array_diff() took 0.823 seconds and returned 60000 entries
Output for 7.1.3
Starting array_diff array_diff() took 0.944 seconds and returned 60000 entries
Output for 7.0.32
Starting array_diff array_diff() took 1.533 seconds and returned 60000 entries
Output for 7.0.31
Starting array_diff array_diff() took 0.810 seconds and returned 60000 entries
Output for 7.0.30
Starting array_diff array_diff() took 0.663 seconds and returned 60000 entries
Output for 7.0.29
Starting array_diff array_diff() took 1.319 seconds and returned 60000 entries
Output for 7.0.28
Starting array_diff array_diff() took 1.215 seconds and returned 60000 entries
Output for 7.0.26
Starting array_diff array_diff() took 0.829 seconds and returned 60000 entries
Output for 7.0.25
Starting array_diff array_diff() took 0.909 seconds and returned 60000 entries
Output for 7.0.20
Starting array_diff array_diff() took 0.577 seconds and returned 60000 entries
Output for 7.0.18
Starting array_diff array_diff() took 0.966 seconds and returned 60000 entries
Output for 7.0.17
Starting array_diff array_diff() took 0.952 seconds and returned 60000 entries
Output for 7.0.16
Starting array_diff array_diff() took 0.681 seconds and returned 60000 entries
Output for 7.0.8
Starting array_diff array_diff() took 0.898 seconds and returned 60000 entries
Output for 7.0.7
Starting array_diff array_diff() took 0.838 seconds and returned 60000 entries
Output for 7.0.6
Starting array_diff array_diff() took 1.227 seconds and returned 60000 entries
Output for 7.0.5
Starting array_diff array_diff() took 1.125 seconds and returned 60000 entries
Output for 7.0.4
Starting array_diff array_diff() took 0.617 seconds and returned 60000 entries
Output for 7.0.1
Starting array_diff array_diff() took 0.693 seconds and returned 60000 entries

preferences:
171.77 ms | 401 KiB | 242 Q