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"; $data_diff1 = array_diff_key($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.0.0 - 7.0.20, 7.1.0, 7.1.7, 7.2.0
Starting array_diff array_diff() took 0.000 seconds and returned 0 entries
Output for 7.1.5 - 7.1.6
Starting array_diff array_diff() took 0.001 seconds and returned 0 entries
Output for 5.2.5 - 5.2.7, 5.2.9 - 5.2.17, 5.3.0 - 5.3.10, 5.3.12 - 5.3.26, 5.3.28 - 5.3.29, 5.4.0 - 5.4.11, 5.4.13 - 5.4.21, 5.4.23 - 5.4.26, 5.4.28 - 5.4.30, 5.4.32, 5.4.44 - 5.4.45, 5.5.24, 5.5.28, 5.5.33, 5.6.9, 5.6.11 - 5.6.12, 5.6.14, 5.6.18, 5.6.20, 5.6.28
Starting array_diff array_diff() took 0.002 seconds and returned 0 entries
Output for 5.2.8, 5.3.11, 5.3.27, 5.4.12, 5.4.22, 5.4.27, 5.4.31, 5.4.43, 5.5.25 - 5.5.27, 5.5.29 - 5.5.32, 5.5.34 - 5.5.35, 5.6.8, 5.6.10, 5.6.13, 5.6.15 - 5.6.17, 5.6.19, 5.6.21
Starting array_diff array_diff() took 0.003 seconds and returned 0 entries
Output for 5.4.34 - 5.4.42
Starting array_diff array_diff() took 0.004 seconds and returned 0 entries
Output for 5.2.4
Starting array_diff array_diff() took 0.488 seconds and returned 0 entries
Output for 5.2.3
Starting array_diff array_diff() took 0.500 seconds and returned 0 entries
Output for 5.2.2
Starting array_diff array_diff() took 0.514 seconds and returned 0 entries
Output for 5.2.1
Starting array_diff array_diff() took 0.759 seconds and returned 0 entries
Output for 5.2.0
Starting array_diff array_diff() took 0.806 seconds and returned 0 entries
Output for 5.1.6
Starting array_diff array_diff() took 0.781 seconds and returned 0 entries
Output for 5.1.5
Starting array_diff array_diff() took 0.788 seconds and returned 0 entries
Output for 5.1.4
Starting array_diff array_diff() took 0.802 seconds and returned 0 entries
Output for 5.1.3
Starting array_diff array_diff() took 0.780 seconds and returned 0 entries
Output for 5.1.2
Starting array_diff array_diff() took 0.786 seconds and returned 0 entries
Output for 5.1.1
Starting array_diff array_diff() took 0.794 seconds and returned 0 entries
Output for 5.1.0
Starting array_diff array_diff() took 0.855 seconds and returned 0 entries
Output for 5.0.0 - 5.0.5
Starting array_diff Fatal error: Call to undefined function array_diff_key() in /in/1fnO8 on line 12
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Starting array_diff Fatal error: Call to undefined function: array_diff_key() in /in/1fnO8 on line 12
Process exited with code 255.
Output for 4.3.2 - 4.3.11, 4.4.0 - 4.4.4
Starting array_diff Fatal error: Call to undefined function: array_diff_key() in /in/1fnO8 on line 12
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Starting array_diff Fatal error: Call to undefined function: array_diff_key() in /in/1fnO8 on line 12

preferences:
133.95 ms | 401 KiB | 174 Q