3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a=range(1,10000); function odd($elt) { return $elt & 1; } $start=microtime(true); for ($i=0;$i<100;$i++) { $b=array_filter($a, 'odd'); } echo "time = ", microtime(true) - $start, "\n";

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
7.4.00.0030.09415.89
7.3.120.0130.05515.90
7.3.110.0100.08816.02
7.3.100.0030.04915.93
7.3.90.0070.04615.95
7.3.80.0030.08416.02
7.3.70.0100.04515.96
7.3.60.0100.04515.78
7.3.50.0070.04916.02
7.3.40.0130.04315.76
7.3.30.0070.04715.85
7.3.20.0070.04818.51
7.3.10.0070.04318.59
7.3.00.0070.04718.36
7.2.250.0000.10416.36
7.2.240.0130.09416.40
7.2.230.0030.05316.05
7.2.220.0030.05415.95
7.2.210.0070.09216.05
7.2.200.0100.05016.52
7.2.190.0030.05116.40
7.2.180.0030.05416.05
7.2.170.0130.04516.29
7.2.00.0060.04819.26
7.1.330.0030.06815.80
7.1.320.0070.06315.83
7.1.310.0030.06315.75
7.1.300.0030.06215.78
7.1.290.0030.06215.53
7.1.280.0000.06215.83
7.1.270.0070.06015.61
7.1.260.0030.06115.66
7.1.70.0000.06817.34
7.1.60.0130.08719.24
7.1.50.0100.06134.86
7.1.00.0030.14322.40
7.0.200.0100.06016.70
7.0.140.0030.14321.97
7.0.70.0070.14021.93
7.0.60.0000.12021.68
7.0.50.0130.09321.43
7.0.40.0030.08020.10
7.0.30.0000.09320.04
7.0.20.0100.10020.04
7.0.10.0100.08020.04
7.0.00.0100.15720.12
5.6.280.0100.28723.44
5.6.220.0100.30722.91
5.6.210.0070.29023.09
5.6.200.0000.22323.46
5.6.190.0070.23323.27
5.6.180.0100.23323.37
5.6.170.0000.23023.33
5.6.160.0000.22323.21
5.6.150.0030.18723.43
5.6.140.0170.26323.36
5.6.130.0030.18723.25
5.6.120.0130.27723.39
5.6.110.0170.29723.33
5.6.100.0030.26023.26
5.6.90.0070.25323.36
5.6.80.0070.26322.78
5.6.70.0130.29722.65
5.6.60.0070.26022.64
5.6.50.0130.29722.72
5.6.40.0200.27022.70
5.6.30.0200.28722.78
5.6.20.0000.29322.69
5.6.10.0030.27022.63
5.6.00.0070.30322.68
5.5.360.0070.27022.88
5.5.350.0030.29722.72
5.5.340.0100.24322.96
5.5.330.0130.21723.05
5.5.320.0130.29023.25
5.5.310.0030.22723.04
5.5.300.0000.25023.06
5.5.290.0170.26023.14
5.5.280.0070.20723.08
5.5.270.0100.26323.19
5.5.260.0030.24023.07
5.5.250.0070.24023.00
5.5.240.0070.29022.50
5.5.230.0170.24722.52
5.5.220.0030.27022.34
5.5.210.0100.25022.43
5.5.200.0130.25322.49
5.5.190.0100.28322.48
5.5.180.0070.26322.50
5.5.160.0030.25722.45
5.5.150.0070.21022.39
5.5.140.0070.23022.49
5.5.130.0030.26722.53
5.5.120.0100.28722.55
5.5.110.0100.27322.59
5.5.100.0130.28322.39
5.5.90.0030.29722.41
5.5.80.0030.29322.38
5.5.70.0030.23722.47
5.5.60.0130.26322.51
5.5.50.0130.29722.28
5.5.40.0030.27322.46
5.5.30.0130.28022.27
5.5.20.0070.21722.35
5.5.10.0130.28322.36
5.5.00.0070.27722.35
5.4.450.0100.27321.46
5.4.440.0030.23721.63
5.4.430.0070.26721.42
5.4.420.0000.24721.52
5.4.410.0100.30021.62
5.4.400.0000.25021.36
5.4.390.0130.23721.15
5.4.380.0100.25021.29
5.4.370.0100.23721.29
5.4.360.0100.28721.27
5.4.350.0100.28021.11
5.4.340.0100.27021.14
5.4.320.0100.28321.20
5.4.310.0070.28321.10
5.4.300.0030.22021.30
5.4.290.0030.22721.30
5.4.280.0070.22321.14
5.4.270.0070.26721.31
5.4.260.0100.27021.46
5.4.250.0100.28021.46
5.4.240.0070.26021.20
5.4.230.0000.26721.42
5.4.220.0100.26721.25
5.4.210.0070.25321.34
5.4.200.0030.22021.29
5.4.190.0130.28721.30
5.4.180.0170.26021.29
5.4.170.0030.22721.16
5.4.160.0170.24021.24
5.4.150.0030.24321.13
5.4.140.0100.27018.59
5.4.130.0030.27318.79
5.4.120.0030.29018.62
5.4.110.0070.28318.57
5.4.100.0170.27718.80
5.4.90.0000.30718.63
5.4.80.0030.25318.63
5.4.70.0070.30018.70
5.4.60.0030.27718.75
5.4.50.0070.28318.61
5.4.40.0130.28718.73
5.4.30.0070.20018.70
5.4.20.0030.20318.56
5.4.10.0070.28318.56
5.4.00.0070.21317.94
5.3.290.0070.29016.99
5.3.280.0030.30016.87
5.3.270.0070.24016.79
5.3.260.0030.30016.74
5.3.250.0000.26316.79
5.3.240.0070.27016.84
5.3.230.0070.24716.79
5.3.220.0030.28716.75
5.3.210.0070.29316.86
5.3.200.0130.26016.79
5.3.190.0170.28716.78
5.3.180.0070.20716.70
5.3.170.0030.23716.79
5.3.160.0100.29016.92
5.3.150.0000.25316.89
5.3.140.0100.24316.77
5.3.130.0100.29016.74
5.3.120.0070.26716.72
5.3.110.0130.29716.68
5.3.100.0100.27016.38
5.3.90.0070.21716.25
5.3.80.0030.23716.10
5.3.70.0000.29716.28
5.3.60.0100.29316.16
5.3.50.0070.25016.02
5.3.40.0000.21716.12
5.3.30.0070.28016.10
5.3.20.0000.23015.90
5.3.10.0100.29715.87
5.3.00.0170.29015.85
5.2.170.0030.26313.23
5.2.160.0070.27713.09
5.2.150.0030.27313.30
5.2.140.0070.29313.06
5.2.130.0030.22013.09
5.2.120.0000.25713.14
5.2.110.0100.21013.02
5.2.100.0070.29313.12
5.2.90.0030.25713.25
5.2.80.0070.27313.01
5.2.70.0030.25313.24
5.2.60.0000.21013.15
5.2.50.0070.26713.08
5.2.40.0030.28312.92
5.2.30.0070.29312.89
5.2.20.0100.22313.10
5.2.10.0030.24712.91
5.2.00.0030.27712.91
5.1.60.0070.26312.92
5.1.50.0100.27712.84
5.1.40.0100.18712.91
5.1.30.0070.23713.14
5.1.20.0000.20713.32
5.1.10.0030.24312.98
5.1.00.0070.27712.92
5.0.50.0000.26712.25
5.0.40.0000.27712.25
5.0.30.0030.21012.25
5.0.20.0030.24712.25
5.0.10.0130.29312.25
5.0.00.0000.33312.25
4.4.90.0100.32312.25
4.4.80.0000.28712.25
4.4.70.0000.30012.25
4.4.60.0030.34712.25
4.4.50.0030.27712.25
4.4.40.0030.36712.25
4.4.30.0030.34012.25
4.4.20.0200.34712.25
4.4.10.0070.33712.25
4.4.00.0030.34712.25
4.3.110.0030.28012.25
4.3.100.0030.29712.25
4.3.90.0030.25712.25
4.3.80.0000.37312.25
4.3.70.0370.27312.25
4.3.60.0000.27712.25
4.3.50.0000.27012.25
4.3.40.0000.28712.25
4.3.30.0070.26012.25
4.3.20.0100.22312.25
4.3.10.0000.24312.25
4.3.00.0000.27012.25

preferences:
46.58 ms | 400 KiB | 5 Q