3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Any; $value = array( ); for ($i=0;$i<1e6;$i++) { $value[] = $i; } $start = microtime(true); $values = array_map(function($item){ return $item+1;}, $value); $end = microtime(true); echo "Simple func took: ", number_format(($end-$start)*1e3, 2), PHP_EOL; $start = microtime(true); $values = \array_map(function($item){ return $item+1;}, $value); $end = microtime(true); echo "Direct func took: ", number_format(($end-$start)*1e3, 2);

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)
8.0.110.0200.02449.60
8.0.100.0220.02249.71
8.0.90.0140.03149.59
8.0.80.0460.04349.73
8.0.70.0200.02449.75
8.0.60.0200.02449.75
8.0.50.0150.02949.60
8.0.30.0540.04149.83
8.0.20.0810.04049.93
8.0.10.0270.01749.78
8.0.00.0550.04849.68
7.4.240.0270.02449.32
7.4.230.0100.03649.16
7.4.220.0740.04049.34
7.4.210.0440.05449.36
7.4.200.0250.02149.54
7.4.160.0430.05449.37
7.4.150.0660.09049.47
7.4.140.0720.04849.49
7.4.130.0850.05949.46
7.4.120.0550.05349.42
7.4.110.0790.05949.25
7.4.100.0590.05649.39
7.4.90.0940.05149.50
7.4.80.0590.04949.29
7.4.70.0590.04349.19
7.4.60.0730.05649.44
7.4.50.0330.02749.30
7.4.40.0680.05849.38
7.4.30.0820.02349.21
7.4.00.0370.03947.71
7.3.300.0200.02649.20
7.3.290.0470.04649.23
7.3.280.0680.05249.20
7.3.270.0520.05749.62
7.3.260.0710.04049.40
7.3.250.0710.05349.31
7.3.240.0690.05849.44
7.3.230.0820.04649.42
7.3.210.0540.05449.46
7.3.200.0690.03949.32
7.3.190.0660.04449.44
7.3.180.0590.05549.13
7.3.170.0560.05649.20
7.3.160.0510.05749.29
7.3.120.0400.03747.93
7.3.110.0330.03947.61
7.3.100.0420.03947.79
7.3.90.0230.04747.86
7.3.80.0280.03447.67
7.3.70.0320.03447.68
7.3.60.0260.03647.72
7.3.50.0150.05247.83
7.3.40.0300.03547.66
7.3.30.0270.03547.79
7.3.20.0270.03850.40
7.3.10.0320.03250.54
7.3.00.0240.04150.46
7.2.330.0670.04449.68
7.2.320.0670.05349.67
7.2.310.0610.05149.72
7.2.300.0580.05849.69
7.2.290.0800.03349.45
7.2.250.0450.03848.00
7.2.240.0370.04948.04
7.2.230.0200.05848.11
7.2.220.0370.03548.00
7.2.210.0380.03847.83
7.2.200.0320.04547.89
7.2.190.0380.03347.87
7.2.180.0270.04247.98
7.2.170.0240.04447.75
7.2.160.0320.03648.05
7.2.150.0270.03051.00
7.2.140.0190.03850.85
7.2.130.0280.02850.90
7.2.120.0270.03350.55
7.2.110.0170.04050.72
7.2.100.0280.03150.59
7.2.90.0300.03050.81
7.2.80.1080.03150.76
7.2.70.0270.03451.03
7.2.60.0520.03250.75
7.2.50.0490.03250.75
7.2.40.0300.03050.91
7.2.30.0250.03550.82
7.2.20.0260.03650.78
7.2.10.0400.02350.62
7.2.00.0250.03051.91
7.1.330.0400.05349.72
7.1.320.0300.05549.84
7.1.310.0270.05549.63
7.1.300.0230.06149.56
7.1.290.0250.06449.70
7.1.280.0280.06249.51
7.1.270.0250.06549.69
7.1.260.0200.06049.61
7.1.250.0130.06749.72
7.1.200.0460.03349.68
7.1.100.2520.03349.79
7.1.70.0590.04150.70
7.1.60.0510.04451.30
7.1.50.0420.02950.71
7.1.40.0510.02150.57
7.1.30.0400.04750.57
7.1.20.0540.03350.74
7.1.10.0210.03150.54
7.1.00.0110.03950.62
7.0.200.0480.02450.50
7.0.190.0500.02950.61
7.0.180.0520.05550.27
7.0.170.0560.06350.45
7.0.160.0490.04550.30
7.0.150.0270.02450.17
7.0.140.0280.04950.19
7.0.130.0310.02450.43
7.0.120.0290.03250.49
7.0.110.0290.02950.27
7.0.100.0330.03650.23
7.0.90.0320.05450.33
7.0.80.0160.04250.42
7.0.70.0220.03150.19
7.0.60.0220.02849.98
7.0.50.0200.02650.45
7.0.40.0200.03348.31
7.0.30.0160.03348.50
7.0.20.0110.04448.52
7.0.10.0200.03348.45
7.0.00.0270.06048.19

preferences:
42.43 ms | 400 KiB | 5 Q