3v4l.org

run code in 300+ PHP versions simultaneously
<?php function number_factory($num) { return function($operation) 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.70.0070.00716.50
8.3.60.0140.00716.50
8.3.50.0120.00517.46
8.3.40.0060.00918.97
8.3.30.0120.00618.67
8.3.20.0040.00418.96
8.3.10.0040.00420.48
8.3.00.0040.00419.38
8.2.180.0090.00616.50
8.2.170.0100.00722.96
8.2.160.0090.00621.02
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0050.00326.16
8.2.120.0000.00722.08
8.2.110.0030.00719.30
8.2.100.0060.00617.61
8.2.90.0050.00319.07
8.2.80.0050.00317.97
8.2.70.0040.00417.63
8.2.60.0060.00317.93
8.2.50.0050.00318.10
8.2.40.0040.00418.28
8.2.30.0080.00017.95
8.2.20.0070.00317.75
8.2.10.0000.00717.89
8.2.00.0040.00417.81
8.1.280.0070.00725.92
8.1.270.0050.00324.66
8.1.260.0000.00826.35
8.1.250.0080.00028.09
8.1.240.0090.00020.97
8.1.230.0080.00319.23
8.1.220.0030.00617.78
8.1.210.0040.00418.77
8.1.200.0030.00617.36
8.1.190.0040.00419.13
8.1.180.0040.00418.10
8.1.170.0000.00818.95
8.1.160.0000.00818.97
8.1.150.0070.00018.78
8.1.140.0020.00517.47
8.1.130.0030.00317.90
8.1.120.0000.00817.37
8.1.110.0030.00617.38
8.1.100.0040.00417.50
8.1.90.0000.00817.53
8.1.80.0080.00017.52
8.1.70.0060.00317.46
8.1.60.0030.00617.57
8.1.50.0060.00317.51
8.1.40.0030.00517.54
8.1.30.0040.00417.62
8.1.20.0050.00317.76
8.1.10.0030.00517.48
8.1.00.0000.00717.49
8.0.300.0060.00318.77
8.0.290.0090.00016.75
8.0.280.0030.00318.44
8.0.270.0000.00717.18
8.0.260.0000.00816.80
8.0.250.0000.00717.02
8.0.240.0070.00017.03
8.0.230.0030.00316.99
8.0.220.0030.00316.97
8.0.210.0030.00616.79
8.0.200.0070.00017.02
8.0.190.0000.00817.11
8.0.180.0000.00716.98
8.0.170.0060.00316.95
8.0.160.0000.00717.05
8.0.150.0060.00316.92
8.0.140.0110.00016.89
8.0.130.0060.00013.38
8.0.120.0000.00816.98
8.0.110.0040.00417.04
8.0.100.0030.00616.98
8.0.90.0030.00516.96
8.0.80.0040.01116.96
8.0.70.0080.00017.05
8.0.60.0000.00716.88
8.0.50.0030.00516.81
8.0.30.0120.00616.84
8.0.20.0090.01217.26
8.0.10.0000.00716.88
8.0.00.0070.01216.92
7.4.330.0050.00012.94
7.4.320.0070.00016.39
7.4.300.0030.00316.63
7.4.290.0030.00616.54
7.4.280.0040.00416.53
7.4.270.0030.00316.63
7.4.260.0050.00013.29
7.4.250.0030.00616.45
7.4.240.0070.00016.64
7.4.230.0070.00016.47
7.4.220.0150.00416.62
7.4.210.0060.01016.64
7.4.200.0030.00516.51
7.4.190.0000.00716.62
7.4.160.0060.00916.69
7.4.150.0120.00816.55
7.4.140.0130.00516.38
7.4.130.0100.00716.44
7.4.120.0090.00916.66
7.4.110.0100.00616.62
7.4.100.0090.00916.49
7.4.90.0090.00916.61
7.4.80.0140.00619.39
7.4.70.0100.00616.49
7.4.60.0030.01316.42
7.4.50.0060.00616.76
7.4.40.0070.00716.48
7.4.30.0060.00916.66
7.4.00.0060.00915.18
7.3.330.0070.00013.39
7.3.320.0000.00513.40
7.3.310.0030.00316.25
7.3.300.0000.00716.27
7.3.290.0090.00616.41
7.3.280.0080.00716.38
7.3.270.0060.01316.36
7.3.260.0090.00916.43
7.3.250.0120.00716.45
7.3.240.0090.00916.67
7.3.230.0030.01216.45
7.3.210.0080.01516.56
7.3.200.0090.00916.50
7.3.190.0170.00616.48
7.3.180.0090.00616.58
7.3.170.0090.00616.50
7.3.160.0030.01316.46
7.3.120.0030.00914.95
7.3.10.0000.01116.69
7.3.00.0030.00616.86
7.2.330.0060.01216.50
7.2.320.0110.00716.64
7.2.310.0140.01016.54
7.2.300.0030.01416.30
7.2.290.0100.00616.41
7.2.130.0040.00716.86
7.2.120.0100.00316.91
7.2.110.0030.01016.66
7.2.100.0030.00616.84
7.2.90.0060.00916.93
7.2.80.0060.00316.98
7.2.70.0090.00316.73
7.2.60.0050.00716.86
7.2.50.0030.00616.66
7.2.40.0030.00916.85
7.2.30.0030.01316.82
7.2.20.0070.00717.07
7.2.10.0050.00516.55
7.2.00.0090.00218.19
7.1.250.0030.00915.76
7.1.200.0030.01015.62
7.1.100.0000.01518.17
7.1.70.0000.00817.12
7.1.60.0060.01919.40
7.1.50.0090.01316.78
7.1.00.0030.03322.43
7.0.200.0610.00314.61
7.0.140.0000.07722.05
7.0.60.0030.09019.90
7.0.50.0100.07717.99
7.0.40.0070.07017.86
7.0.30.0100.04317.75
7.0.20.0130.03717.82
7.0.10.0030.05317.68
7.0.00.0100.07317.79
5.6.280.0070.07020.89
5.6.210.0170.02720.59
5.6.200.0030.08018.17
5.6.190.0070.05018.26
5.6.180.0070.07318.17
5.6.170.0000.04318.22
5.6.160.0030.09018.19
5.6.150.0070.08318.22
5.6.140.0070.08318.26
5.6.130.0070.07018.19
5.6.120.0170.07718.19
5.6.110.0100.05018.14
5.6.100.0070.08018.15
5.6.90.0070.04718.27
5.6.80.0130.07017.53
5.6.70.0070.05717.52
5.6.60.0270.05017.65
5.6.50.0070.04317.62
5.6.40.0100.07017.51
5.6.30.0200.06317.65
5.6.20.0170.05317.51
5.6.10.0070.05717.50
5.6.00.0170.07017.54
5.5.350.0130.06720.35
5.5.340.0000.09318.05
5.5.330.0070.04718.05
5.5.320.0070.03717.97
5.5.310.0130.06318.02
5.5.300.0030.06717.99
5.5.290.0070.07317.95
5.5.280.0070.04717.99
5.5.270.0070.04317.98
5.5.260.0200.06317.93
5.5.250.0130.05017.83
5.5.240.0030.06017.46
5.5.230.0070.07717.40
5.5.220.0100.07317.34
5.5.210.0100.07717.43
5.5.200.0030.07717.37
5.5.190.0130.06017.45
5.5.180.0130.05717.34
5.5.160.0030.06717.33
5.5.150.0030.04717.40
5.5.140.0030.06317.29
5.5.130.0100.05017.43
5.5.120.0000.07317.31
5.5.110.0070.07017.29
5.5.100.0070.04717.20
5.5.90.0130.07317.35
5.5.80.0100.06717.34
5.5.70.0070.04717.21
5.5.60.0030.06017.32
5.5.50.0100.06317.26
5.5.40.0000.07017.20
5.5.30.0030.08017.21
5.5.20.0030.08017.29
5.5.10.0130.03017.23
5.5.00.0030.06017.22
5.4.450.0070.07719.21
5.4.440.0030.04719.46
5.4.430.0130.07319.34
5.4.420.0070.08319.46
5.4.410.0070.07719.09
5.4.400.0100.07719.06
5.4.390.0070.08018.89
5.4.380.0100.07019.13
5.4.370.0170.07019.05
5.4.360.0070.07719.09
5.4.350.0130.07019.06
5.4.340.0030.08318.98
5.4.320.0070.07719.02
5.4.310.0030.05019.11
5.4.300.0030.08019.10
5.4.290.0000.06019.09
5.4.280.0030.04319.05
5.4.270.0070.05319.02
5.4.260.0070.06018.95
5.4.250.0070.05019.12
5.4.240.0130.06719.12
5.4.230.0100.03319.03
5.4.220.0100.06719.11
5.4.210.0200.04319.05
5.4.200.0070.03719.13
5.4.190.0070.04718.95
5.4.180.0070.04019.05
5.4.170.0130.07019.02
5.4.160.0070.07718.93
5.4.150.0030.06718.97
5.4.140.0100.07316.36
5.4.130.0070.04316.43
5.4.120.0070.04016.45
5.4.110.0070.05016.43
5.4.100.0130.06016.53
5.4.90.0030.05016.52
5.4.80.0070.03316.46
5.4.70.0030.07316.39
5.4.60.0000.05716.43
5.4.50.0000.06716.47
5.4.40.0030.04016.48
5.4.30.0070.04016.31
5.4.20.0030.08716.42
5.4.10.0070.04316.56
5.4.00.0000.04315.75
5.3.290.0030.04314.77
5.3.280.0170.06714.59
5.3.270.0100.05714.70
5.3.260.0100.07314.64
5.3.250.0070.06314.68
5.3.240.0100.06714.74
5.3.230.0100.05014.68
5.3.220.0030.05014.82
5.3.210.0100.07714.82
5.3.200.0030.07014.66
5.3.190.0100.07314.65
5.3.180.0000.04714.64
5.3.170.0100.07314.61
5.3.160.0070.07314.59
5.3.150.0200.06314.64
5.3.140.0070.07314.68
5.3.130.0030.08314.62
5.3.120.0130.07014.55
5.3.110.0100.04714.55
5.3.100.0070.04314.03
5.3.90.0030.07314.09
5.3.80.0000.08014.07
5.3.70.0100.07014.08
5.3.60.0130.04714.04
5.3.50.0130.06313.98
5.3.40.0070.05014.00
5.3.30.0030.07013.98
5.3.20.0070.07713.58
5.3.10.0100.06313.58
5.3.00.0000.04313.71
5.2.170.0000.06711.01
5.2.160.0000.07011.14
5.2.150.0030.03711.00
5.2.140.0030.04011.13
5.2.130.0070.03011.13
5.2.120.0000.04011.10
5.2.110.0030.04011.32
5.2.100.0070.02711.13
5.2.90.0130.05311.13
5.2.80.0070.04010.97
5.2.70.0030.05711.18
5.2.60.0100.05010.89
5.2.50.0100.03311.06
5.2.40.0030.06011.05
5.2.30.0030.06710.93
5.2.20.0070.06010.93
5.2.10.0030.05710.75
5.2.00.0070.04010.78
5.1.60.0000.03010.00
5.1.50.0000.0309.95
5.1.40.0030.04310.02
5.1.30.0030.05710.36
5.1.20.0070.06010.20
5.1.10.0000.0339.91
5.1.00.0030.05710.16
5.0.50.0030.0279.00
5.0.40.0100.0309.00
5.0.30.0030.0539.00
5.0.20.0030.0339.00
5.0.10.0000.0479.00
5.0.00.0030.0639.00
4.4.90.0030.0339.00
4.4.80.0030.0239.00
4.4.70.0030.0279.00
4.4.60.0100.0279.00
4.4.50.0000.0279.00
4.4.40.0000.0279.00
4.4.30.0000.0179.00
4.4.20.0070.0209.00
4.4.10.0000.0379.00
4.4.00.0030.0539.00
4.3.110.0070.0339.00
4.3.100.0070.0179.00
4.3.90.0000.0209.00
4.3.80.0000.0539.00
4.3.70.0030.0379.00
4.3.60.0070.0279.00
4.3.50.0100.0239.00
4.3.40.0000.0309.00
4.3.30.0000.0239.00
4.3.20.0000.0239.00
4.3.10.0000.0179.00
4.3.00.0000.0379.00

preferences:
62 ms | 401 KiB | 5 Q