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($dividedBy($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.40.0090.00618.89
8.3.30.0030.01320.18
8.3.20.0090.00920.20
8.3.10.0060.00322.00
8.3.00.0060.00322.37
8.2.170.0110.00422.96
8.2.160.0040.01122.03
8.2.150.0060.01224.18
8.2.140.0060.00324.66
8.2.130.0100.00726.16
8.2.120.0030.00519.64
8.2.110.0080.00022.13
8.2.100.0080.00417.73
8.2.90.0080.00019.05
8.2.80.0080.00019.32
8.2.70.0000.01017.63
8.2.60.0030.00617.93
8.2.50.0000.00818.07
8.2.40.0050.00318.10
8.2.30.0070.00017.96
8.2.20.0070.00017.67
8.2.10.0040.00417.70
8.2.00.0040.00817.77
8.1.270.0070.00024.66
8.1.260.0040.00426.35
8.1.250.0050.00228.09
8.1.240.0090.00022.25
8.1.230.0070.00419.15
8.1.220.0000.00817.74
8.1.210.0000.00818.77
8.1.200.0030.00617.23
8.1.190.0030.00517.43
8.1.180.0030.00618.10
8.1.170.0030.00618.57
8.1.160.0000.00822.20
8.1.150.0050.00318.68
8.1.140.0000.00717.47
8.1.130.0030.00317.86
8.1.120.0030.00317.38
8.1.110.0040.00417.54
8.1.100.0050.00217.37
8.1.90.0030.00517.45
8.1.80.0000.00717.32
8.1.70.0000.00717.44
8.1.60.0030.00617.53
8.1.50.0030.00617.55
8.1.40.0000.00817.56
8.1.30.0040.00417.59
8.1.20.0040.00417.62
8.1.10.0000.00817.62
8.1.00.0030.00617.58
8.0.300.0000.00718.77
8.0.290.0040.00417.18
8.0.280.0040.00418.35
8.0.270.0000.00717.16
8.0.260.0070.00016.76
8.0.250.0060.00017.05
8.0.240.0090.00017.00
8.0.230.0040.00417.01
8.0.220.0040.00416.84
8.0.210.0030.00316.80
8.0.200.0000.00617.02
8.0.190.0030.00316.99
8.0.180.0000.00817.00
8.0.170.0040.00316.90
8.0.160.0000.00716.77
8.0.150.0040.00416.88
8.0.140.0070.00016.79
8.0.130.0030.00313.37
8.0.120.0000.00816.77
8.0.110.0040.00416.92
8.0.100.0040.00416.96
8.0.90.0040.00416.90
8.0.80.0090.00616.91
8.0.70.0050.00316.99
8.0.60.0040.00416.88
8.0.50.0000.00716.71
8.0.30.0080.01017.08
8.0.20.0080.01117.40
8.0.10.0040.00416.86
8.0.00.0150.00516.82
7.4.330.0030.00315.00
7.4.320.0060.00016.43
7.4.300.0070.00016.68
7.4.290.0000.00616.60
7.4.280.0030.00316.59
7.4.270.0070.00016.50
7.4.260.0000.00716.50
7.4.250.0000.00716.63
7.4.240.0020.00516.56
7.4.230.0030.00316.44
7.4.220.0130.00716.57
7.4.210.0070.00816.60
7.4.200.0030.00316.54
7.4.190.0000.00816.59
7.4.160.0030.01316.70
7.4.150.0090.00817.40
7.4.140.0110.00617.86
7.4.130.0130.00816.45
7.4.120.0140.00316.58
7.4.110.0060.01216.43
7.4.100.0130.01016.49
7.4.90.0070.01416.34
7.4.80.0030.01619.39
7.4.70.0090.01216.61
7.4.60.0100.01016.54
7.4.50.0030.00516.60
7.4.40.0040.01122.77
7.4.30.0180.00416.43
7.4.00.0030.01315.00
7.3.330.0030.00313.35
7.3.320.0030.00313.41
7.3.310.0000.00716.25
7.3.300.0070.00016.40
7.3.290.0040.01416.38
7.3.280.0090.00816.37
7.3.270.0070.01117.40
7.3.260.0100.00916.49
7.3.250.0090.00816.58
7.3.240.0110.00816.66
7.3.230.0110.00616.64
7.3.210.0130.00616.36
7.3.200.0090.00719.39
7.3.190.0100.01016.59
7.3.180.0130.01016.54
7.3.170.0060.00916.67
7.3.160.0170.00016.39
7.3.120.0070.00815.02
7.3.110.0100.00614.70
7.3.100.0100.00014.84
7.3.90.0090.00614.53
7.3.80.0060.00615.07
7.3.70.0060.00614.84
7.3.60.0070.00714.89
7.3.50.0100.00714.74
7.3.40.0030.00914.88
7.3.30.0060.00615.06
7.3.20.0030.00816.79
7.3.10.0090.00616.32
7.3.00.0060.00916.54
7.2.330.0150.00616.74
7.2.320.0060.01216.81
7.2.310.0400.03016.79
7.2.300.0130.00316.61
7.2.290.0090.00616.58
7.2.250.0080.01015.08
7.2.240.0030.01514.96
7.2.230.0110.01115.05
7.2.220.0080.00315.13
7.2.210.0100.00715.07
7.2.200.0040.00814.99
7.2.190.0090.00315.05
7.2.180.0040.01215.21
7.2.170.0030.01315.24
7.2.60.0040.00416.77
7.2.50.0090.00016.88
7.1.330.0070.00715.76
7.1.320.0040.00715.91
7.1.310.0030.01115.84
7.1.300.0070.00715.87
7.1.290.0060.00915.92
7.1.280.0080.00315.71
7.1.270.0000.00915.82
7.1.260.0050.00515.63
7.1.200.0070.00715.76
7.1.70.0070.00417.21
7.1.60.0070.01719.43
7.1.50.0100.01016.96
7.1.00.0000.07322.27
7.0.200.0000.00716.57
7.0.140.0030.07722.11
7.0.60.0170.05319.84
7.0.50.0070.04717.93
7.0.40.0070.05320.23
7.0.30.0270.08020.24
7.0.20.0230.06720.21
7.0.10.0000.04720.14
7.0.00.0100.08020.07
5.6.280.0070.06720.83
5.6.210.0030.08320.73
5.6.200.0100.07718.16
5.6.190.0030.04720.39
5.6.180.0530.06320.67
5.6.170.0400.06020.46
5.6.160.0200.07020.51
5.6.150.0070.07718.16
5.6.140.0030.04018.16
5.6.130.0100.07318.17
5.6.120.0070.06021.04
5.6.110.0170.07721.04
5.6.100.0170.07321.00
5.6.90.0000.08021.00
5.6.80.0070.03720.42
5.5.350.0170.08320.45
5.5.340.0100.08317.98
5.5.330.0000.08320.49
5.5.320.0330.04720.27
5.5.310.0230.03320.31
5.5.300.0030.03717.98
5.5.290.0030.04318.02
5.5.280.0000.06020.92
5.5.270.0100.08020.91
5.5.260.0070.06320.96
5.5.250.0030.04020.73
5.5.240.0070.05320.38
5.4.450.0670.06019.39
5.4.440.0530.06019.34
5.4.430.0100.05719.63
5.4.420.0100.05319.52
5.4.410.0100.05318.96
5.4.400.0100.05318.55
5.4.390.0130.04718.63
5.4.380.0070.05718.65
5.4.370.0070.05718.61
5.4.360.0100.05718.84
5.4.350.0100.03412.04
5.4.340.0080.03612.04
5.4.320.0120.04612.52
5.4.310.0080.04212.52
5.4.300.0070.03712.53
5.4.290.0080.05112.52
5.4.280.0070.03512.42
5.4.270.0020.04812.43
5.4.260.0090.04812.42
5.4.250.0070.03912.42
5.4.240.0130.04718.96
5.4.230.0130.04718.94
5.4.220.0070.05718.84
5.4.210.0070.06318.81
5.4.200.0200.05319.00
5.4.190.0070.05318.75
5.4.180.0170.06018.96
5.4.170.0130.04718.94
5.4.160.0130.04718.78
5.4.150.0030.05318.83
5.4.140.0130.06316.64
5.4.130.0130.04316.38
5.4.120.0070.04716.47
5.4.110.0170.05016.55
5.4.100.0070.05016.61
5.4.90.0030.05016.47
5.4.80.0100.04716.68
5.4.70.0070.06716.55
5.4.60.0070.04716.44
5.4.50.0070.04716.48
5.4.40.0070.07016.41
5.4.30.0100.06016.35
5.4.20.0130.04016.34
5.4.10.0100.04716.49
5.4.00.0030.05015.92
5.3.290.0080.03912.80
5.3.280.0030.05314.46
5.3.270.0130.04314.73
5.3.260.0030.08014.65
5.3.250.0030.06014.71
5.3.240.0070.05014.87
5.3.230.0130.04714.86
5.3.220.0030.05314.77
5.3.210.0000.05714.82
5.3.200.0030.05314.79
5.3.190.0170.06014.70
5.3.180.0070.05014.67
5.3.170.0130.05714.68
5.3.160.0130.05014.62
5.3.150.0030.05714.78
5.3.140.0070.05314.78
5.3.130.0030.08014.69
5.3.120.0100.05014.57
5.3.110.0170.04014.43
5.3.100.0100.06314.07
5.3.90.0070.05014.05
5.3.80.0170.06014.14
5.3.70.0030.05014.13
5.3.60.0030.05314.11
5.3.50.0130.04014.05
5.3.40.0000.05313.99
5.3.30.0170.04714.16
5.3.20.0070.04713.73
5.3.10.0070.04713.68
5.3.00.0130.06313.75
5.2.170.0030.04011.21
5.2.160.0030.05711.21
5.2.150.0000.04711.22
5.2.140.0100.04310.96
5.2.130.0000.04311.09
5.2.120.0100.03011.18
5.2.110.0030.04311.08
5.2.100.0170.04311.16
5.2.90.0100.03310.95
5.2.80.0100.04011.17
5.2.70.0070.04011.04
5.2.60.0070.03711.21
5.2.50.0070.04011.20
5.2.40.0130.03711.04
5.2.30.0030.04011.05
5.2.20.0130.03311.14
5.2.10.0070.03711.09
5.2.00.0070.03710.81
5.1.60.0030.03310.14
5.1.50.0070.0309.95
5.1.40.0070.03310.01
5.1.30.0130.02310.41
5.1.20.0000.04310.43
5.1.10.0030.03710.30
5.1.00.0000.03710.26
5.0.50.0000.0378.64
5.0.40.0000.0338.20
5.0.30.0030.0408.17
5.0.20.0030.0238.39
5.0.10.0070.0238.17
5.0.00.0000.0438.16
4.4.90.0030.0206.42
4.4.80.0100.0136.42
4.4.70.0030.0206.42
4.4.60.0030.0206.42
4.4.50.0000.0236.42
4.4.40.0000.0336.59
4.4.30.0000.0236.59
4.4.20.0070.0176.59
4.4.10.0030.0306.59
4.4.00.0070.0306.59
4.3.110.0070.0176.59
4.3.100.0000.0236.59
4.3.90.0000.0206.59
4.3.80.0000.0336.59
4.3.70.0030.0206.59
4.3.60.0000.0206.59
4.3.50.0030.0206.59
4.3.40.0030.0306.59
4.3.30.0000.0236.59
4.3.20.0000.0236.59
4.3.10.0030.0306.59
4.3.00.0130.0206.92

preferences:
34.56 ms | 400 KiB | 5 Q