3v4l.org

run code in 300+ PHP versions simultaneously
<?php function number_factory($num) { return function($operation=null) use ($num) { return $operation ? $operation($num) : $num; }; } function operation_factory($operation) { return function($b) use ($operation) { return function($a) use ($b, $operation) { return $operation($a, $b); }; }; } $plus = operation_factory(function($a, $b) { return $a+$b; }); $minus = operation_factory(function($a, $b) { return $a-$b; }); $times = operation_factory(function($a, $b) { return $a*$b; }); $dividedBy = operation_factory(function($a, $b) { return $a/$b; }); $zero = number_factory(0); $one = number_factory(1); $two = number_factory(2); $three = number_factory(3); $four = number_factory(4); $five = number_factory(5); $six = number_factory(6); $seven = number_factory(7); $eight = number_factory(8); $nine = number_factory(9); print($two($plus($three($minus($two())))));

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.30
8.3.50.0070.01321.99
8.3.40.0090.00618.84
8.3.30.0120.00620.34
8.3.20.0140.00320.34
8.3.10.0180.00021.81
8.3.00.0000.00822.39
8.2.180.0140.00318.54
8.2.170.0040.01122.96
8.2.160.0110.00422.15
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0120.00426.16
8.2.120.0070.01119.66
8.2.110.0000.00822.14
8.2.100.0120.00017.84
8.2.90.0030.00619.08
8.2.80.0030.00519.32
8.2.70.0000.00917.50
8.2.60.0050.00517.89
8.2.50.0080.00018.07
8.2.40.0030.00618.16
8.2.30.0050.00318.10
8.2.20.0000.00717.67
8.2.10.0050.00317.71
8.2.00.0000.01217.77
8.1.280.0030.01325.92
8.1.270.0040.00424.66
8.1.260.0080.00026.35
8.1.250.0070.00028.09
8.1.240.0030.00622.18
8.1.230.0000.01219.18
8.1.220.0040.00417.78
8.1.210.0030.00518.77
8.1.200.0000.00817.35
8.1.190.0060.00317.40
8.1.180.0030.00618.10
8.1.170.0060.00318.37
8.1.160.0040.00422.17
8.1.150.0050.00318.56
8.1.140.0040.00417.46
8.1.130.0000.00717.79
8.1.120.0030.00317.54
8.1.110.0040.00417.47
8.1.100.0040.00417.37
8.1.90.0030.00517.40
8.1.80.0000.00717.45
8.1.70.0000.00717.40
8.1.60.0060.00317.52
8.1.50.0030.00617.57
8.1.40.0000.01117.42
8.1.30.0030.00617.67
8.1.20.0000.00817.59
8.1.10.0030.00617.61
8.1.00.0040.00417.52
8.0.300.0040.00418.77
8.0.290.0000.00717.04
8.0.280.0000.00718.40
8.0.270.0000.00717.28
8.0.260.0030.00316.77
8.0.250.0070.00017.03
8.0.240.0060.00317.03
8.0.230.0030.00316.94
8.0.220.0000.00816.86
8.0.210.0070.00016.91
8.0.200.0000.00816.89
8.0.190.0030.00316.95
8.0.180.0000.00716.92
8.0.170.0040.00416.83
8.0.160.0070.00016.89
8.0.150.0000.00716.82
8.0.140.0080.00016.78
8.0.130.0030.00313.31
8.0.120.0060.00316.94
8.0.110.0050.00316.95
8.0.100.0030.00516.90
8.0.90.0080.00016.93
8.0.80.0030.01316.93
8.0.70.0040.00416.82
8.0.60.0000.00716.99
8.0.50.0040.00416.92
8.0.30.0110.00916.81
8.0.20.0140.00717.40
8.0.10.0050.00217.07
8.0.00.0100.00816.76
7.4.330.0070.00015.00
7.4.320.0030.00316.46
7.4.300.0060.00016.60
7.4.290.0030.00316.59
7.4.280.0030.00316.38
7.4.270.0000.00716.69
7.4.260.0000.00716.46
7.4.250.0040.00416.57
7.4.240.0020.00516.58
7.4.230.0000.00716.46
7.4.220.0110.00616.57
7.4.210.0110.00716.62
7.4.200.0030.00316.63
7.4.190.0050.00216.70
7.4.160.0090.00616.48
7.4.150.0030.01417.40
7.4.140.0070.01017.86
7.4.130.0060.01116.66
7.4.120.0130.00316.71
7.4.110.0100.00716.51
7.4.100.0100.01516.41
7.4.90.0120.01216.45
7.4.80.0210.00319.39
7.4.70.0060.00916.49
7.4.60.0090.00616.46
7.4.50.0030.00516.57
7.4.40.0100.00022.77
7.4.30.0120.01016.53
7.4.00.0050.01114.97
7.3.330.0030.00313.25
7.3.320.0060.00013.30
7.3.310.0070.00016.40
7.3.300.0030.00316.34
7.3.290.0110.00416.35
7.3.280.0070.00916.34
7.3.270.0030.01317.40
7.3.260.0100.01416.59
7.3.250.0140.00616.43
7.3.240.0130.00316.71
7.3.230.0090.00616.60
7.3.210.0120.00416.62
7.3.200.0190.00519.39
7.3.190.0100.00716.45
7.3.180.0130.00316.25
7.3.170.0060.00916.40
7.3.160.0080.00816.52
7.3.120.0090.00514.92
7.3.110.0040.01414.89
7.3.100.0080.00315.15
7.3.90.0100.00715.00
7.3.80.0070.00414.84
7.3.70.0060.00314.71
7.3.60.0070.01014.90
7.3.50.0060.00915.03
7.3.40.0060.00714.79
7.3.30.0040.01115.08
7.3.20.0070.00716.83
7.3.10.0090.00616.65
7.3.00.0040.01116.77
7.2.330.0070.01016.71
7.2.320.0120.01516.38
7.2.310.0110.00716.79
7.2.300.0070.01016.48
7.2.290.0030.01416.70
7.2.250.0150.00415.16
7.2.240.0070.01414.90
7.2.230.0100.00715.25
7.2.220.0100.00714.61
7.2.210.0060.01215.28
7.2.200.0060.00315.07
7.2.190.0000.01415.21
7.2.180.0030.01014.96
7.2.170.0110.00715.08
7.2.00.0030.01219.65
7.1.330.0030.01015.78
7.1.320.0090.00315.71
7.1.310.0110.00415.75
7.1.300.0140.00015.83
7.1.290.0100.00315.50
7.1.280.0000.01715.89
7.1.270.0090.00615.88
7.1.260.0000.01715.91
7.1.100.0120.00818.20
7.1.70.0000.01317.07
7.1.60.0040.02219.43
7.1.50.0060.00616.78
7.1.00.0000.07722.46
7.0.200.0000.00716.48
7.0.140.0030.07022.09
7.0.60.0100.08019.80
7.0.50.0100.07317.99
7.0.40.0100.08720.24
7.0.30.0270.06720.22
7.0.20.0300.05020.16
7.0.10.0030.05020.23
7.0.00.0070.08720.09
5.6.280.0100.07020.92
5.6.210.0070.04720.65
5.6.200.0100.08018.20
5.6.190.0130.08020.52
5.6.180.0300.04020.41
5.6.170.0200.07320.52
5.6.160.0070.04320.39
5.6.150.0270.03318.19
5.6.140.0100.07718.29
5.6.130.0070.05718.14
5.6.120.0130.08021.01
5.6.110.0270.07321.16
5.6.100.0100.08021.03
5.6.90.0130.08021.13
5.6.80.0070.04720.38
5.5.350.0330.06720.46
5.5.340.0130.07317.95
5.5.330.0170.07720.40
5.5.320.0270.03320.42
5.5.310.0330.07720.35
5.5.300.0070.07017.94
5.5.290.0070.07017.99
5.5.280.0200.04720.91
5.5.270.0030.05720.97
5.5.260.0030.09020.92
5.5.250.0100.08020.79
5.5.240.0330.06720.31
5.4.450.4030.04019.65
5.4.440.0070.03319.46
5.4.430.3400.04019.30
5.4.420.3570.03319.52
5.4.410.3670.03719.18
5.4.400.3730.03719.07
5.4.390.3570.04019.31
5.4.380.3700.04019.06
5.4.370.3670.03318.94
5.4.360.3900.03719.19
5.4.350.3630.04018.98
5.4.340.3800.03319.20
5.4.320.3770.03719.08
5.4.310.4100.03719.20
5.4.300.3730.03019.08
5.4.290.3700.04319.16
5.4.280.3200.04018.98
5.4.270.3800.03018.98
5.4.260.3800.03318.87
5.4.250.4270.03319.13
5.4.240.4070.03018.93
5.4.230.3700.04019.21
5.4.220.3670.04019.31
5.4.210.3770.03018.98
5.4.200.3730.04319.30
5.4.190.2730.03319.13
5.4.180.1830.03719.21
5.4.170.3100.03719.30
5.4.160.4330.05019.06
5.4.150.3400.03018.85
5.4.140.2030.03316.34
5.4.130.3230.02716.55
5.4.120.3230.03716.54
5.4.110.3100.03016.26
5.4.100.3500.03316.34
5.4.90.3270.03716.24
5.4.80.3630.03316.58
5.4.70.3170.03016.60
5.4.60.3730.03016.57
5.4.50.3300.03316.32
5.4.40.3630.02716.54
5.4.30.3530.03716.61
5.4.20.3630.03016.32
5.4.10.3870.04016.32
5.4.00.4070.04315.75
5.3.290.3670.03314.71
5.3.280.3730.03314.63
5.3.270.2200.03714.62
5.3.260.2770.03014.55
5.3.250.2470.03714.56
5.3.240.2470.03714.63
5.3.230.2830.03714.61
5.3.220.3670.04014.83
5.3.210.2030.04014.52
5.3.200.3500.03714.69
5.3.190.3470.03714.66
5.3.180.3630.04014.66
5.3.170.3600.03314.51
5.3.160.3530.03314.59
5.3.150.3770.03314.77
5.3.140.3600.03314.75
5.3.130.3600.03714.68
5.3.120.3600.03714.71
5.3.110.3600.04014.61
5.3.100.3530.03714.20
5.3.90.3600.03314.29
5.3.80.3570.03714.06
5.3.70.3700.03314.21
5.3.60.4000.03314.16
5.3.50.4070.04313.91
5.3.40.3670.04013.89
5.3.30.4470.04013.86
5.3.20.3600.03713.65
5.3.10.4530.03313.62
5.3.00.3770.03713.65
5.2.170.2800.03011.07
5.2.160.3100.02311.05
5.2.150.3100.02311.26
5.2.140.3270.02711.36
5.2.130.3200.03011.01
5.2.120.3130.03011.03
5.2.110.3230.02711.25
5.2.100.3100.02711.11
5.2.90.3130.02311.26
5.2.80.3230.03311.17
5.2.70.3200.02311.17
5.2.60.3030.03011.09
5.2.50.3100.02310.93
5.2.40.2470.02710.89
5.2.30.2470.03011.05
5.2.20.2430.03010.95
5.2.10.2530.03310.84
5.2.00.2530.02710.63
5.1.60.2130.0239.97
5.1.50.2500.02310.00
5.1.40.2530.0239.95
5.1.30.2500.02310.43
5.1.20.2400.02710.57
5.1.10.1900.03310.04
5.1.00.2300.02710.14
5.0.50.1230.0178.45
5.0.40.1170.0208.41
5.0.30.1170.0308.27
5.0.20.1170.0178.14
5.0.10.1200.0208.06
5.0.00.1230.0278.07
4.4.90.1330.0105.99
4.4.80.1270.0175.99
4.4.70.1300.0175.99
4.4.60.0930.0175.99
4.4.50.1330.0175.99
4.4.40.1130.0235.90
4.4.30.1430.0175.91
4.4.20.1170.0135.91
4.4.10.1130.0175.91
4.4.00.1170.0235.91
4.3.110.1130.0175.91
4.3.100.1130.0205.91
4.3.90.1170.0135.91
4.3.80.1230.0275.91
4.3.70.1170.0175.91
4.3.60.1200.0135.91
4.3.50.1170.0175.91
4.3.40.1200.0235.91
4.3.30.0630.0175.91
4.3.20.0630.0135.91
4.3.10.0730.0235.91
4.3.00.0500.0135.91

preferences:
47.63 ms | 401 KiB | 5 Q