3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $i=0; $j=500000; while($i < 100000) { $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.0.0, 7.1.0
Starting array_diff array_diff() took 0.019 seconds and returned 100000 entries
Output for 7.0.5, 7.0.14
Starting array_diff array_diff() took 0.018 seconds and returned 100000 entries
Output for hhvm-3.10.0 - 3.12.0, 7.0.1, 7.0.6
Starting array_diff array_diff() took 0.017 seconds and returned 100000 entries
Output for 7.0.4
Starting array_diff array_diff() took 0.016 seconds and returned 100000 entries
Output for 7.0.3
Starting array_diff array_diff() took 0.027 seconds and returned 100000 entries
Output for 7.0.2
Starting array_diff array_diff() took 0.029 seconds and returned 100000 entries
Output for 5.6.28
Starting array_diff array_diff() took 0.265 seconds and returned 100000 entries
Output for 5.6.9, 5.6.21
Starting array_diff array_diff() took 0.295 seconds and returned 100000 entries
Output for 5.6.20
Starting array_diff array_diff() took 0.315 seconds and returned 100000 entries
Output for 5.5.24, 5.6.17, 5.6.19
Starting array_diff array_diff() took 0.308 seconds and returned 100000 entries
Output for 5.6.18
Starting array_diff array_diff() took 0.285 seconds and returned 100000 entries
Output for 5.6.16
Starting array_diff array_diff() took 0.314 seconds and returned 100000 entries
Output for 5.6.15
Starting array_diff array_diff() took 0.307 seconds and returned 100000 entries
Output for 5.6.14
Starting array_diff array_diff() took 0.313 seconds and returned 100000 entries
Output for 5.6.13
Starting array_diff array_diff() took 0.309 seconds and returned 100000 entries
Output for 5.5.27, 5.6.12
Starting array_diff array_diff() took 0.312 seconds and returned 100000 entries
Output for 5.6.8, 5.6.11
Starting array_diff array_diff() took 0.300 seconds and returned 100000 entries
Output for 5.6.10
Starting array_diff array_diff() took 0.319 seconds and returned 100000 entries
Output for 5.6.7
Starting array_diff array_diff() took 0.301 seconds and returned 100000 entries
Output for 5.5.35
Starting array_diff array_diff() took 0.280 seconds and returned 100000 entries
Output for 5.5.34
Starting array_diff array_diff() took 0.318 seconds and returned 100000 entries
Output for 5.5.33
Starting array_diff array_diff() took 0.336 seconds and returned 100000 entries
Output for 5.5.31 - 5.5.32
Starting array_diff array_diff() took 0.284 seconds and returned 100000 entries
Output for 5.5.30
Starting array_diff array_diff() took 0.303 seconds and returned 100000 entries
Output for 5.5.29
Starting array_diff array_diff() took 0.311 seconds and returned 100000 entries
Output for 5.5.28
Starting array_diff array_diff() took 0.317 seconds and returned 100000 entries
Output for 5.5.26
Starting array_diff array_diff() took 0.302 seconds and returned 100000 entries
Output for 5.5.25
Starting array_diff array_diff() took 0.321 seconds and returned 100000 entries
Output for 5.4.45
Starting array_diff array_diff() took 0.680 seconds and returned 100000 entries
Output for 5.4.44
Starting array_diff array_diff() took 0.729 seconds and returned 100000 entries
Output for 5.4.43
Starting array_diff array_diff() took 0.381 seconds and returned 100000 entries
Output for 5.4.42
Starting array_diff array_diff() took 0.606 seconds and returned 100000 entries
Output for 5.4.41
Starting array_diff array_diff() took 0.710 seconds and returned 100000 entries
Output for 5.4.40
Starting array_diff array_diff() took 0.925 seconds and returned 100000 entries
Output for 5.4.39
Starting array_diff array_diff() took 0.901 seconds and returned 100000 entries
Output for 5.4.38
Starting array_diff array_diff() took 0.689 seconds and returned 100000 entries
Output for 5.4.37
Starting array_diff array_diff() took 0.523 seconds and returned 100000 entries
Output for 5.4.22, 5.4.36
Starting array_diff array_diff() took 0.527 seconds and returned 100000 entries
Output for 5.4.35
Starting array_diff array_diff() took 0.553 seconds and returned 100000 entries
Output for 5.4.34
Starting array_diff array_diff() took 0.573 seconds and returned 100000 entries
Output for 5.4.32
Starting array_diff array_diff() took 0.334 seconds and returned 100000 entries
Output for 5.4.31
Starting array_diff array_diff() took 0.351 seconds and returned 100000 entries
Output for 5.4.30
Starting array_diff array_diff() took 0.535 seconds and returned 100000 entries
Output for 5.4.29
Starting array_diff array_diff() took 0.751 seconds and returned 100000 entries
Output for 5.4.28
Starting array_diff array_diff() took 0.722 seconds and returned 100000 entries
Output for 5.4.27
Starting array_diff array_diff() took 0.774 seconds and returned 100000 entries
Output for 5.0.0, 5.4.21, 5.4.26
Starting array_diff array_diff() took 0.696 seconds and returned 100000 entries
Output for 5.4.23, 5.4.25
Starting array_diff array_diff() took 0.694 seconds and returned 100000 entries
Output for 5.4.24
Starting array_diff array_diff() took 0.674 seconds and returned 100000 entries
Output for 5.4.20
Starting array_diff array_diff() took 0.525 seconds and returned 100000 entries
Output for 5.4.2, 5.4.19
Starting array_diff array_diff() took 0.532 seconds and returned 100000 entries
Output for 5.4.18
Starting array_diff array_diff() took 0.562 seconds and returned 100000 entries
Output for 5.4.17
Starting array_diff array_diff() took 0.736 seconds and returned 100000 entries
Output for 5.4.16
Starting array_diff array_diff() took 0.630 seconds and returned 100000 entries
Output for 5.4.15
Starting array_diff array_diff() took 0.881 seconds and returned 100000 entries
Output for 5.4.14
Starting array_diff array_diff() took 0.730 seconds and returned 100000 entries
Output for 5.4.13
Starting array_diff array_diff() took 0.543 seconds and returned 100000 entries
Output for 5.4.12
Starting array_diff array_diff() took 0.646 seconds and returned 100000 entries
Output for 5.4.11
Starting array_diff array_diff() took 0.731 seconds and returned 100000 entries
Output for 5.4.10
Starting array_diff array_diff() took 0.780 seconds and returned 100000 entries
Output for 5.4.9
Starting array_diff array_diff() took 0.675 seconds and returned 100000 entries
Output for 5.4.8
Starting array_diff array_diff() took 0.693 seconds and returned 100000 entries
Output for 5.4.7
Starting array_diff array_diff() took 0.865 seconds and returned 100000 entries
Output for 5.4.6
Starting array_diff array_diff() took 0.772 seconds and returned 100000 entries
Output for 5.4.5
Starting array_diff array_diff() took 0.681 seconds and returned 100000 entries
Output for 5.4.4
Starting array_diff array_diff() took 0.639 seconds and returned 100000 entries
Output for 5.4.3
Starting array_diff array_diff() took 0.522 seconds and returned 100000 entries
Output for 5.1.2, 5.4.1
Starting array_diff array_diff() took 0.572 seconds and returned 100000 entries
Output for 5.4.0
Starting array_diff array_diff() took 0.709 seconds and returned 100000 entries
Output for 5.3.29
Starting array_diff array_diff() took 0.277 seconds and returned 100000 entries
Output for 5.3.28
Starting array_diff array_diff() took 0.467 seconds and returned 100000 entries
Output for 5.3.27
Starting array_diff array_diff() took 0.603 seconds and returned 100000 entries
Output for 5.3.26
Starting array_diff array_diff() took 0.655 seconds and returned 100000 entries
Output for 5.3.25
Starting array_diff array_diff() took 0.457 seconds and returned 100000 entries
Output for 5.3.4, 5.3.24
Starting array_diff array_diff() took 0.663 seconds and returned 100000 entries
Output for 5.3.12, 5.3.23
Starting array_diff array_diff() took 0.666 seconds and returned 100000 entries
Output for 5.3.22
Starting array_diff array_diff() took 0.462 seconds and returned 100000 entries
Output for 5.3.21
Starting array_diff array_diff() took 0.668 seconds and returned 100000 entries
Output for 5.3.20
Starting array_diff array_diff() took 0.631 seconds and returned 100000 entries
Output for 5.3.19
Starting array_diff array_diff() took 0.551 seconds and returned 100000 entries
Output for 5.3.18
Starting array_diff array_diff() took 0.528 seconds and returned 100000 entries
Output for 5.3.17
Starting array_diff array_diff() took 0.465 seconds and returned 100000 entries
Output for 5.3.16
Starting array_diff array_diff() took 0.542 seconds and returned 100000 entries
Output for 5.3.15
Starting array_diff array_diff() took 0.870 seconds and returned 100000 entries
Output for 5.3.14
Starting array_diff array_diff() took 0.828 seconds and returned 100000 entries
Output for 5.3.13
Starting array_diff array_diff() took 0.739 seconds and returned 100000 entries
Output for 5.3.11
Starting array_diff array_diff() took 0.608 seconds and returned 100000 entries
Output for 5.3.10
Starting array_diff array_diff() took 0.594 seconds and returned 100000 entries
Output for 5.3.9
Starting array_diff array_diff() took 0.508 seconds and returned 100000 entries
Output for 5.3.8
Starting array_diff array_diff() took 0.531 seconds and returned 100000 entries
Output for 4.4.8, 5.3.7
Starting array_diff array_diff() took 0.634 seconds and returned 100000 entries
Output for 5.3.6
Starting array_diff array_diff() took 0.749 seconds and returned 100000 entries
Output for 5.3.5
Starting array_diff array_diff() took 0.676 seconds and returned 100000 entries
Output for 5.0.2, 5.2.6 - 5.2.14, 5.3.0 - 5.3.3
Starting array_diff
Process exited with code 137.
Output for 5.2.17
Starting array_diff array_diff() took 0.716 seconds and returned 100000 entries
Output for 5.2.16
Starting array_diff array_diff() took 0.504 seconds and returned 100000 entries
Output for 5.2.15
Starting array_diff array_diff() took 0.495 seconds and returned 100000 entries
Output for 5.2.5
Starting array_diff array_diff() took 0.636 seconds and returned 100000 entries
Output for 5.2.4
Starting array_diff array_diff() took 0.587 seconds and returned 100000 entries
Output for 5.2.3
Starting array_diff array_diff() took 0.590 seconds and returned 100000 entries
Output for 5.2.2
Starting array_diff array_diff() took 0.509 seconds and returned 100000 entries
Output for 5.2.1
Starting array_diff array_diff() took 0.700 seconds and returned 100000 entries
Output for 5.2.0
Starting array_diff array_diff() took 0.686 seconds and returned 100000 entries
Output for 5.1.6
Starting array_diff array_diff() took 0.704 seconds and returned 100000 entries
Output for 5.1.5
Starting array_diff array_diff() took 0.851 seconds and returned 100000 entries
Output for 5.1.4
Starting array_diff array_diff() took 1.001 seconds and returned 100000 entries
Output for 5.1.3
Starting array_diff array_diff() took 0.561 seconds and returned 100000 entries
Output for 5.1.1
Starting array_diff array_diff() took 0.778 seconds and returned 100000 entries
Output for 5.1.0
Starting array_diff array_diff() took 0.946 seconds and returned 100000 entries
Output for 5.0.5
Starting array_diff array_diff() took 0.701 seconds and returned 100000 entries
Output for 5.0.4
Starting array_diff array_diff() took 0.748 seconds and returned 100000 entries
Output for 5.0.3
Starting array_diff array_diff() took 0.980 seconds and returned 100000 entries
Output for 5.0.1
Starting array_diff array_diff() took 0.719 seconds and returned 100000 entries
Output for 4.4.9
Starting array_diff array_diff() took -0.359 seconds and returned 100000 entries
Output for 4.4.7
Starting array_diff array_diff() took -0.216 seconds and returned 100000 entries
Output for 4.4.6
Starting array_diff array_diff() took 0.612 seconds and returned 100000 entries
Output for 4.4.5
Starting array_diff array_diff() took -0.389 seconds and returned 100000 entries
Output for 4.4.4
Starting array_diff array_diff() took -0.460 seconds and returned 100000 entries
Output for 4.4.3
Starting array_diff array_diff() took 0.626 seconds and returned 100000 entries
Output for 4.4.2
Starting array_diff array_diff() took -0.360 seconds and returned 100000 entries
Output for 4.4.1
Starting array_diff array_diff() took -0.013 seconds and returned 100000 entries
Output for 4.4.0
Starting array_diff array_diff() took -0.106 seconds and returned 100000 entries
Output for 4.3.11
Starting array_diff array_diff() took 0.580 seconds and returned 100000 entries
Output for 4.3.10
Starting array_diff array_diff() took -0.458 seconds and returned 100000 entries
Output for 4.3.9
Starting array_diff array_diff() took -0.351 seconds and returned 100000 entries
Output for 4.3.8
Starting array_diff array_diff() took -0.454 seconds and returned 100000 entries
Output for 4.3.7
Starting array_diff array_diff() took -0.138 seconds and returned 100000 entries
Output for 4.3.6
Starting array_diff array_diff() took -0.014 seconds and returned 100000 entries
Output for 4.3.5
Starting array_diff array_diff() took -0.030 seconds and returned 100000 entries
Output for 4.3.4
Starting array_diff array_diff() took -0.023 seconds and returned 100000 entries
Output for 4.3.3
Starting array_diff array_diff() took -0.244 seconds and returned 100000 entries
Output for 4.3.2
Starting array_diff array_diff() took 0.652 seconds and returned 100000 entries
Output for 4.3.1
Starting array_diff array_diff() took 0.643 seconds and returned 100000 entries
Output for 4.3.0
Starting array_diff array_diff() took 0.042 seconds and returned 100000 entries