3v4l.org

run code in 300+ PHP versions simultaneously
<?php function cube($n) { return($n * $n * $n); } function cube2($n) { echo ($n * $n * $n); } $a = array(1, 2, 3, 4, 5); $b = array_map("cube", $a); print_r($b); array_walk($a, "cube2"); ?>

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.3.60.0100.01018.31
8.3.50.0030.01718.21
8.3.40.0120.00318.60
8.3.30.0150.00018.50
8.3.20.0050.00321.74
8.3.10.0040.00423.60
8.3.00.0050.00323.54
8.2.180.0180.00416.35
8.2.170.0220.00019.01
8.2.160.0100.00322.96
8.2.150.0060.00324.18
8.2.140.0070.01124.66
8.2.130.0040.00421.00
8.2.120.0070.00026.35
8.2.110.0070.00321.06
8.2.100.0080.00417.72
8.2.90.0080.00017.84
8.2.80.0000.00918.09
8.2.70.0000.00817.80
8.2.60.0040.00418.03
8.2.50.0040.00418.10
8.2.40.0000.00919.05
8.2.30.0020.00519.15
8.2.20.0040.00418.05
8.2.10.0030.00618.04
8.2.00.0030.00618.15
8.1.280.0000.01525.92
8.1.270.0040.00422.14
8.1.260.0050.00326.35
8.1.250.0060.00328.09
8.1.240.0130.00323.98
8.1.230.0040.00720.96
8.1.220.0050.00317.74
8.1.210.0000.00818.77
8.1.200.0050.00317.36
8.1.190.0040.00417.35
8.1.180.0080.00018.10
8.1.170.0030.00618.43
8.1.160.0040.00418.81
8.1.150.0080.00019.00
8.1.140.0000.00717.57
8.1.130.0030.00318.88
8.1.120.0040.00417.39
8.1.110.0050.00217.38
8.1.100.0000.00717.36
8.1.90.0000.00717.41
8.1.80.0040.00417.38
8.1.70.0030.00517.37
8.1.60.0040.00417.54
8.1.50.0030.00517.50
8.1.40.0000.00717.30
8.1.30.0030.00617.57
8.1.20.0070.00017.51
8.1.10.0060.00317.40
8.1.00.0040.00417.42
8.0.300.0000.00820.03
8.0.290.0070.00016.63
8.0.280.0030.00518.35
8.0.270.0000.00817.24
8.0.260.0070.00017.11
8.0.250.0030.00316.97
8.0.240.0070.00016.88
8.0.230.0070.00016.86
8.0.220.0090.00016.71
8.0.210.0000.00716.80
8.0.200.0060.00016.80
8.0.190.0040.00416.75
8.0.180.0000.00816.82
8.0.170.0030.00616.72
8.0.160.0000.00816.83
8.0.150.0040.00416.71
8.0.140.0070.00416.69
8.0.130.0030.00313.23
8.0.120.0000.00716.77
8.0.110.0000.00716.76
8.0.100.0000.00816.85
8.0.90.0000.00716.78
8.0.80.0120.00916.78
8.0.70.0050.00316.81
8.0.60.0040.00416.79
8.0.50.0040.00416.70
8.0.30.0100.00717.11
8.0.20.0140.01017.40
8.0.10.0040.00416.93
8.0.00.0080.01116.57
7.4.330.0050.00015.55
7.4.320.0000.00616.40
7.4.300.0060.00016.43
7.4.290.0070.00416.52
7.4.280.0000.00816.53
7.4.270.0030.00316.34
7.4.260.0030.00316.50
7.4.250.0000.00716.41
7.4.240.0070.00016.53
7.4.230.0000.00816.39
7.4.220.0040.00416.41
7.4.210.0080.00816.53
7.4.200.0070.00016.26
7.4.160.0090.00816.40
7.4.140.0120.00617.86
7.4.130.0110.00616.38
7.4.120.0100.01016.45
7.4.110.0170.00316.41
7.4.100.0130.00516.43
7.4.90.0060.01016.46
7.4.80.0120.01219.39
7.4.70.0140.00616.30
7.4.60.0100.00716.48
7.4.50.0060.00616.46
7.4.40.0090.00616.56
7.4.00.0090.00615.04
7.3.330.0040.00413.09
7.3.320.0000.00513.04
7.3.310.0030.00316.26
7.3.300.0030.00316.08
7.3.290.0070.00016.10
7.3.280.0040.01116.25
7.3.260.0050.01216.22
7.3.240.0080.00916.42
7.3.230.0060.01216.43
7.3.210.0080.01316.41
7.3.200.0170.00016.43
7.3.190.0090.01216.29
7.3.180.0120.00316.29
7.3.170.0080.00816.30
7.3.160.0060.00916.53
7.3.120.0100.00614.76
7.3.110.0100.00314.67
7.3.100.0080.00814.75
7.3.90.0030.01014.54
7.3.80.0070.00514.66
7.3.70.0070.00914.86
7.3.60.0060.00714.83
7.3.50.0080.00514.70
7.3.40.0100.00714.60
7.3.30.0050.01114.66
7.3.20.0050.00916.68
7.3.10.0120.00416.65
7.3.00.0070.00816.56
7.2.330.0030.01716.60
7.2.320.0120.00616.54
7.2.310.0160.00616.79
7.2.300.0040.01216.73
7.2.290.0120.00416.65
7.2.240.0100.00515.04
7.2.230.0070.01014.91
7.2.220.0070.01015.07
7.2.210.0030.01114.89
7.2.200.0070.00715.11
7.2.190.0050.00815.03
7.2.180.0090.00514.89
7.2.170.0020.00914.86
7.2.160.0050.00614.90
7.2.150.0070.00716.66
7.2.140.0030.01016.89
7.2.130.0040.00716.92
7.2.120.0070.00716.79
7.2.110.0060.00916.82
7.2.100.0070.00516.71
7.2.90.0040.01016.88
7.2.80.0080.00516.95
7.2.70.0050.00916.86
7.2.60.0130.01016.79
7.2.50.0040.00916.83
7.2.40.0080.00617.03
7.2.30.0060.01017.04
7.2.20.0070.00917.12
7.2.10.0770.00917.07
7.2.00.0390.00617.02
7.1.330.0140.00415.54
7.1.320.0070.00815.63
7.1.310.0030.00815.63
7.1.300.0070.00515.51
7.1.290.0120.00315.71
7.1.280.0050.00715.68
7.1.270.0080.00415.86
7.1.260.0030.00715.73
7.1.250.0070.00615.71
7.1.200.0030.01315.45
7.1.160.0090.01116.63
7.1.150.0110.00716.86
7.1.140.2380.00716.85
7.1.130.1780.01116.84
7.1.120.1610.01116.88
7.1.110.1630.00916.09
7.1.100.0420.01016.47
7.1.90.1270.01116.25
7.1.80.0110.01316.20
7.1.70.0130.01515.13
7.1.60.1290.01433.25
7.1.50.1420.01132.85
7.1.40.1270.01232.46
7.1.30.1180.01532.70
7.1.20.0320.01132.67
7.1.10.0980.01314.61
7.1.00.1430.00814.76

preferences:
57.69 ms | 401 KiB | 5 Q