3v4l.org

run code in 300+ PHP versions simultaneously
<?php $items=23; $shortP = $items %10; $numP = ($items - $shortP) / 10 + 1; $extraI = $items - $numP; echo "There are $items items\n"; echo "They fit in $numP packages\n"; echo "Shipping cost is:\n"; echo " $numP * each_first cost\n"; echo " $extraI * each_next cost\n"; $ei = $items; $np = ($items - $ei) / 10 + 1; echo "cost = base * $np + next * " . ($items - $np) . "\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)
8.3.40.0150.00018.61
8.3.30.0130.00918.76
8.3.20.0000.00720.39
8.3.10.0070.00022.10
8.3.00.0040.00423.70
8.2.170.0070.00722.96
8.2.160.0070.00720.35
8.2.150.0030.00525.66
8.2.140.0080.00024.66
8.2.130.0060.00320.56
8.2.120.0040.00426.35
8.2.110.0060.00319.33
8.2.100.0110.00017.72
8.2.90.0050.00319.09
8.2.80.0080.00317.97
8.2.70.0090.00017.63
8.2.60.0000.00817.93
8.2.50.0040.00418.22
8.2.40.0000.00720.59
8.2.30.0040.00419.17
8.2.20.0000.00718.25
8.2.10.0000.00818.16
8.2.00.0070.00018.14
8.1.270.0040.00422.19
8.1.260.0000.00726.35
8.1.250.0040.00428.09
8.1.240.0080.00024.02
8.1.230.0080.00317.77
8.1.220.0050.00317.79
8.1.210.0040.00418.77
8.1.200.0030.00617.38
8.1.190.0000.00817.22
8.1.180.0000.00818.10
8.1.170.0040.00418.64
8.1.160.0040.00418.96
8.1.150.0040.00420.08
8.1.140.0000.00717.35
8.1.130.0070.00019.11
8.1.120.0050.00317.52
8.1.110.0000.00817.45
8.1.100.0070.00017.48
8.1.90.0000.00817.41
8.1.80.0000.00817.52
8.1.70.0090.00017.47
8.1.60.0000.00817.49
8.1.50.0000.00817.48
8.1.40.0070.00017.44
8.1.30.0030.00517.66
8.1.20.0050.00317.74
8.1.10.0040.00417.47
8.1.00.0060.00317.35
8.0.300.0030.00518.77
8.0.290.0030.00616.88
8.0.280.0040.00418.53
8.0.270.0000.00717.28
8.0.260.0050.00318.48
8.0.250.0080.00416.88
8.0.240.0030.00316.91
8.0.230.0030.00317.01
8.0.220.0000.00716.95
8.0.210.0070.00016.90
8.0.200.0050.00316.96
8.0.190.0030.00516.95
8.0.180.0070.00016.93
8.0.170.0000.00816.90
8.0.160.0000.00816.80
8.0.150.0030.00616.93
8.0.140.0050.00316.90
8.0.130.0000.00513.43
8.0.120.0040.00416.92
8.0.110.0040.00416.76
8.0.100.0000.00716.91
8.0.90.0000.00716.87
8.0.80.0090.00616.91
8.0.70.0030.00516.89
8.0.60.0040.00416.97
8.0.50.0040.00416.78
8.0.30.0110.00917.14
8.0.20.0100.00917.40
8.0.10.0030.00516.91
8.0.00.0120.00616.93
7.4.330.0050.00015.55
7.4.320.0000.00616.58
7.4.300.0060.00016.50
7.4.290.0030.00316.54
7.4.280.0050.00316.60
7.4.270.0000.00816.39
7.4.260.0070.00016.61
7.4.250.0050.00216.63
7.4.240.0000.00716.46
7.4.230.0000.00716.66
7.4.220.0080.00816.50
7.4.210.0070.00816.51
7.4.200.0000.00816.63
7.4.160.0110.00816.50
7.4.150.0120.01217.40
7.4.140.0170.00517.86
7.4.130.0190.00516.32
7.4.120.0110.01216.44
7.4.110.0130.00316.38
7.4.100.0130.01016.49
7.4.90.0110.00616.46
7.4.80.0090.00919.39
7.4.70.0100.00716.64
7.4.60.0130.00316.58
7.4.50.0060.00916.61
7.4.40.0090.00816.48
7.4.30.0090.01316.49
7.4.00.0040.00814.97
7.3.330.0030.00313.28
7.3.320.0000.00513.27
7.3.310.0060.00016.43
7.3.300.0030.00316.26
7.3.290.0070.00016.26
7.3.280.0060.01016.34
7.3.270.0070.01017.40
7.3.260.0100.00916.46
7.3.250.0090.02016.49
7.3.240.0100.01016.32
7.3.230.0220.00016.27
7.3.210.0070.01016.46
7.3.200.0030.01316.30
7.3.190.0040.01316.51
7.3.180.0130.00916.33
7.3.170.0130.00316.40
7.3.160.0060.00916.48
7.3.120.0070.01115.07
7.3.110.0130.00315.09
7.3.100.0090.00614.87
7.3.90.0100.00614.86
7.3.80.0000.01614.86
7.3.70.0110.00014.91
7.3.60.0000.01414.95
7.3.50.0100.00714.86
7.3.40.0030.01314.86
7.3.30.0000.01515.00
7.3.20.0070.00416.77
7.3.10.0110.00416.84
7.3.00.0060.00916.70
7.2.330.0160.00316.53
7.2.320.0140.00316.27
7.2.310.0090.00916.63
7.2.300.0070.01016.61
7.2.290.0090.00616.40
7.2.240.0070.01014.73
7.2.230.0070.00714.98
7.2.220.0030.01015.06
7.2.210.0030.00914.77
7.2.200.0040.01414.98
7.2.190.0100.00614.97
7.2.180.0070.00714.95
7.2.170.0060.00615.13
7.2.160.0040.01215.07
7.2.150.0100.00616.82
7.2.140.0000.01716.73
7.2.130.0090.00317.04
7.2.120.0070.01016.88
7.2.110.0110.00016.70
7.2.100.0120.00416.87
7.2.90.0070.01116.89
7.2.80.0080.00417.07
7.2.70.0140.00316.85
7.2.60.0110.00316.81
7.2.50.0030.01016.59
7.2.40.0060.00916.62
7.2.30.0000.01816.81
7.2.20.0040.00716.58
7.2.10.0100.00716.88
7.2.00.0130.00316.74
7.1.330.0030.01215.76
7.1.320.0040.00715.42
7.1.310.0070.00715.91
7.1.300.0040.00715.97
7.1.290.0070.00715.84
7.1.280.0030.01015.75
7.1.270.0100.00615.71
7.1.260.0000.01415.88
7.1.250.0030.01015.80
7.1.200.0070.00715.74
7.1.100.0870.01116.08
7.1.90.1010.00716.05
7.1.80.1070.01115.94
7.1.70.1130.01215.22
7.1.60.1230.01133.28
7.1.50.1130.01232.74
7.1.40.1420.01332.56
7.1.30.1510.01532.69
7.1.20.1310.01332.64
7.1.10.1690.01014.61
7.1.00.1250.00514.77
7.0.240.0850.01216.04
7.0.230.0960.01015.79
7.0.220.1130.00815.92
7.0.210.1350.00314.71
7.0.200.1400.00815.02
7.0.190.1300.01314.64
7.0.180.1240.00914.34
7.0.170.1330.00514.30
7.0.160.1270.00814.64
7.0.150.1160.00814.42
7.0.140.1100.00814.32
7.0.130.1230.01214.67
7.0.120.1110.00814.62
7.0.110.1120.01014.53
7.0.100.1110.01014.42
7.0.90.0980.00714.55
7.0.80.1330.01214.52
7.0.70.1180.00614.48
7.0.60.1050.00314.34
7.0.50.1220.01014.51
7.0.40.1230.00814.73
7.0.30.1190.01014.68
7.0.20.1170.00814.63
7.0.10.1210.01014.58
7.0.00.1160.01214.60

preferences:
68.45 ms | 400 KiB | 5 Q