3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $i=0; $j=500000; while($i < 60000) { $i++; $j++; $data1[] = md5($i); $data2[] = md5($j); } $time = microtime(true); echo "Starting array_filter\n"; $x = 0; $test = array_filter($data1, function($str) use (&$x) { return ++$x % 2 != 0; }); $test = array_filter($data2, function($str) use (&$x) { return ++$x % 2 != 0; }); unset($test); $time = microtime(true) - $time; echo 'array_filter() took ' . number_format($time, 3) . " seconds\n";
based on 6KVOi
Output for 7.0.0 - 7.0.1, 7.0.3, 7.1.0
Starting array_filter array_filter() took 0.015 seconds
Output for 7.0.5 - 7.0.14
Starting array_filter array_filter() took 0.016 seconds
Output for 7.0.4
Starting array_filter array_filter() took 0.019 seconds
Output for 7.0.2
Starting array_filter array_filter() took 0.021 seconds
Output for hhvm-3.12.0
Starting array_filter array_filter() took 0.023 seconds
Output for 5.5.28, 5.5.32, 5.6.7, 5.6.14 - 5.6.15, 5.6.18, hhvm-3.10.0
Starting array_filter array_filter() took 0.030 seconds
Output for 5.4.1 - 5.4.2, 5.4.4, 5.4.26, 5.4.29, 5.5.24, 5.5.33, 5.6.28
Starting array_filter array_filter() took 0.036 seconds
Output for 5.4.15, 5.4.24, 5.5.26, 5.6.11, 5.6.20 - 5.6.21
Starting array_filter array_filter() took 0.034 seconds
Output for 5.4.27, 5.5.30, 5.6.12, 5.6.16, 5.6.19
Starting array_filter array_filter() took 0.032 seconds
Output for 5.4.17, 5.4.28, 5.5.34 - 5.5.35, 5.6.8, 5.6.13, 5.6.17
Starting array_filter array_filter() took 0.033 seconds
Output for 5.5.27, 5.6.10
Starting array_filter array_filter() took 0.031 seconds
Output for 5.4.9, 5.6.9
Starting array_filter array_filter() took 0.035 seconds
Output for 5.5.29, 5.5.31
Starting array_filter array_filter() took 0.029 seconds
Output for 5.3.11, 5.4.10 - 5.4.11, 5.4.16, 5.4.18, 5.5.25
Starting array_filter array_filter() took 0.039 seconds
Output for 5.3.27, 5.4.43, 5.4.45
Starting array_filter array_filter() took 0.053 seconds
Output for 5.4.44
Starting array_filter array_filter() took 0.068 seconds
Output for 5.3.29, 5.4.42
Starting array_filter array_filter() took 0.062 seconds
Output for 5.4.41
Starting array_filter array_filter() took 0.072 seconds
Output for 5.3.3, 5.4.39 - 5.4.40
Starting array_filter array_filter() took 0.054 seconds
Output for 5.4.38
Starting array_filter array_filter() took 0.059 seconds
Output for 5.4.37
Starting array_filter array_filter() took 0.115 seconds
Output for 5.3.12, 5.4.36
Starting array_filter array_filter() took 0.063 seconds
Output for 5.4.35
Starting array_filter array_filter() took 0.101 seconds
Output for 5.4.34
Starting array_filter array_filter() took 0.055 seconds
Output for 5.4.32
Starting array_filter array_filter() took 0.041 seconds
Output for 5.3.1, 5.3.15, 5.4.31
Starting array_filter array_filter() took 0.045 seconds
Output for 5.3.25, 5.4.30
Starting array_filter array_filter() took 0.040 seconds
Output for 5.4.0, 5.4.12, 5.4.14, 5.4.21 - 5.4.22, 5.4.25
Starting array_filter array_filter() took 0.038 seconds
Output for 5.4.3, 5.4.8, 5.4.13, 5.4.19 - 5.4.20, 5.4.23
Starting array_filter array_filter() took 0.037 seconds
Output for 5.3.8, 5.4.7
Starting array_filter array_filter() took 0.044 seconds
Output for 5.3.13, 5.3.28, 5.4.6
Starting array_filter array_filter() took 0.042 seconds
Output for 5.3.0, 5.4.5
Starting array_filter array_filter() took 0.051 seconds
Output for 5.3.5, 5.3.18, 5.3.23, 5.3.26
Starting array_filter array_filter() took 0.050 seconds
Output for 5.3.24
Starting array_filter array_filter() took 0.060 seconds
Output for 5.3.22
Starting array_filter array_filter() took 0.064 seconds
Output for 5.3.21
Starting array_filter array_filter() took 0.057 seconds
Output for 5.3.7, 5.3.17, 5.3.20
Starting array_filter array_filter() took 0.048 seconds
Output for 5.3.19
Starting array_filter array_filter() took 0.046 seconds
Output for 5.3.10, 5.3.16
Starting array_filter array_filter() took 0.047 seconds
Output for 5.3.14
Starting array_filter array_filter() took 0.052 seconds
Output for 5.3.9
Starting array_filter array_filter() took 0.056 seconds
Output for 5.3.2, 5.3.6
Starting array_filter array_filter() took 0.043 seconds
Output for 5.3.4
Starting array_filter array_filter() took 0.070 seconds
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.2.17
Parse error: syntax error, unexpected T_FUNCTION in /in/A9c40 on line 14
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected T_FUNCTION in /in/A9c40 on line 14
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/A9c40 on line 14
Process exited with code 255.