3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo1() { echo 1; } $foo1 = 'foo1'; $foo1(); $foo2 = function () { echo 2; }; $foo2(); class Three { public function __invoke() { echo 3; } } $foo3 = new Three(); $foo3(); class Bar { static function foo4() { echo 4;} function foo5() { echo 5; } } class Bar { static function foo4() { echo 4;} function foo5() { echo 5; } static function foo6() { echo 6;} } $foo3 = array('Bar','foo4'); $foo3(); // we should make this work $foo4 = array(new Bar, 'foo5'); $foo4(); // we should make this work [Bar::class, 'foo6']();

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.0200.00016.75
8.3.50.0130.00417.51
8.3.40.0110.00418.88
8.3.30.0110.00318.81
8.3.20.0040.01218.73
8.3.10.0080.00018.76
8.3.00.0160.00319.26
8.2.180.0070.01317.00
8.2.170.0170.00322.96
8.2.160.0100.00618.96
8.2.150.0000.00824.18
8.2.140.0060.00624.66
8.2.130.0090.00926.16
8.2.120.0040.00420.53
8.2.110.0060.00322.20
8.2.100.0000.01118.03
8.2.90.0040.00420.60
8.2.80.0060.00319.23
8.2.70.0000.00817.50
8.2.60.0080.00317.80
8.2.50.0030.00618.07
8.2.40.0040.00418.09
8.2.30.0040.00418.07
8.2.20.0070.00417.67
8.2.10.0080.00017.68
8.2.00.0050.00217.72
8.1.270.0020.00523.99
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0090.00022.41
8.1.230.0080.00322.67
8.1.220.0000.00817.74
8.1.210.0030.00618.80
8.1.200.0060.00317.38
8.1.190.0030.00517.25
8.1.180.0080.00018.10
8.1.170.0000.00818.50
8.1.160.0000.00818.89
8.1.150.0030.00518.64
8.1.140.0040.00417.40
8.1.130.0030.00317.36
8.1.120.0000.00717.46
8.1.110.0030.00617.41
8.1.100.0000.00717.36
8.1.90.0000.00817.52
8.1.80.0000.00717.46
8.1.70.0040.00417.42
8.1.60.0040.00417.43
8.1.50.0040.00417.41
8.1.40.0080.00017.40
8.1.30.0000.01217.64
8.1.20.0060.00617.53
8.1.10.0050.00217.61
8.1.00.0040.00417.52
8.0.300.0040.00419.86
8.0.290.0040.00416.63
8.0.280.0040.00418.40
8.0.270.0030.00518.10
8.0.260.0060.00016.88
8.0.250.0050.00317.02
8.0.240.0040.00417.01
8.0.230.0000.00816.92
8.0.220.0000.00716.96
8.0.210.0030.00317.02
8.0.200.0000.00717.07
8.0.190.0050.00216.89
8.0.180.0060.00616.96
8.0.170.0000.00817.01
8.0.160.0020.00516.91
8.0.150.0030.00616.91
8.0.140.0030.00616.91
8.0.130.0000.00513.34
8.0.120.0030.00616.82
8.0.110.0020.00516.75
8.0.100.0000.00716.79
8.0.90.0040.00416.85
8.0.80.0070.00716.98
8.0.70.0030.00516.83
8.0.60.0040.00416.95
8.0.50.0040.00416.88
8.0.30.0130.00417.20
8.0.20.0070.01317.05
8.0.10.0000.00717.02
8.0.00.0080.00816.90
7.4.330.0000.00512.93
7.4.320.0030.00316.46
7.4.300.0060.00016.63
7.4.290.0070.00016.48
7.4.280.0040.00416.59
7.4.270.0000.00716.58
7.4.260.0060.00313.28
7.4.250.0050.00516.50
7.4.240.0020.00516.52
7.4.230.0030.00316.41
7.4.220.0140.00416.56
7.4.210.0190.00016.69
7.4.200.0030.00316.70
7.4.190.0080.00016.56
7.4.160.0140.00316.52
7.4.150.0070.01616.49
7.4.140.0160.00317.86
7.4.130.0060.01316.40
7.4.120.0070.01016.41
7.4.110.0130.01016.52
7.4.100.0100.00716.37
7.4.90.0090.00916.43
7.4.80.0140.00319.39
7.4.70.0110.00616.50
7.4.60.0090.01316.47
7.4.50.0030.00616.49
7.4.40.0060.00916.43
7.4.30.0100.00716.56
7.4.00.0080.01015.14
7.3.330.0060.00013.36
7.3.320.0050.00013.27
7.3.310.0040.00416.42
7.3.300.0030.00316.21
7.3.290.0030.01016.35
7.3.280.0070.01416.33
7.3.270.0120.00616.55
7.3.260.0030.01416.31
7.3.240.0060.01216.55
7.3.230.0100.00716.27
7.3.210.0000.01616.66
7.3.200.0040.01216.63
7.3.190.0100.00716.63
7.3.180.0130.00316.41
7.3.170.0060.00916.56
7.3.160.0050.01116.55
7.3.120.0090.00714.92
7.3.110.0040.01114.78
7.3.100.0080.00515.01
7.3.90.0040.01114.94
7.3.80.0010.00915.02
7.3.70.0080.00614.79
7.3.60.0080.00614.85
7.3.50.0050.00814.71
7.3.40.0110.00414.84
7.3.30.0080.00614.84
7.3.20.0060.00616.56
7.3.10.0040.00816.66
7.3.00.0040.00916.67
7.2.330.0060.01216.90
7.2.320.0060.01316.80
7.2.310.0090.00916.67
7.2.300.0040.01716.68
7.2.290.0060.01216.73
7.2.250.0030.01614.89
7.2.240.0030.01215.05
7.2.230.0060.01014.83
7.2.220.0020.01115.11
7.2.210.0080.00715.15
7.2.200.0050.01115.04
7.2.190.0070.00415.14
7.2.180.0020.01514.90
7.2.170.0080.00814.87
7.2.160.0070.01015.22
7.2.150.0090.00616.70
7.2.140.0030.00916.89
7.2.130.0070.00716.83
7.2.120.0120.00317.04
7.2.110.0060.00616.95
7.2.100.0040.01416.94
7.2.90.0070.00717.01
7.2.80.0060.00716.80
7.2.70.0080.00816.74
7.2.60.0070.00717.03
7.2.50.0140.00017.03
7.2.40.0040.01216.77
7.2.30.0060.01217.05
7.2.20.0040.00816.79
7.2.10.0110.00716.96
7.2.00.0030.00918.23
7.1.330.0090.00415.61
7.1.320.0000.01315.71
7.1.310.0020.01515.62
7.1.300.0030.01015.60
7.1.290.0050.00615.57
7.1.280.0050.00915.71
7.1.270.0050.01115.68
7.1.260.0060.00915.67
7.1.250.0100.00715.81
7.1.200.0120.00515.86
7.1.100.0040.00717.98
7.1.70.0000.01317.13
7.1.60.0030.01719.21
7.1.50.0120.00316.80
7.1.00.0030.03322.43
7.0.200.0160.01016.66
7.0.140.0030.07322.09
7.0.120.0000.07722.13
7.0.60.0070.03720.01
7.0.50.0100.03717.89
7.0.40.0170.07020.25
7.0.30.0230.06020.17
7.0.20.0330.05020.19
7.0.10.0170.07020.07
7.0.00.0070.04020.06
5.6.280.0030.07021.07
5.6.210.0100.07020.67
5.6.200.0130.06318.22
5.6.190.0130.07720.57
5.6.180.0430.07320.48
5.6.170.0170.04320.39
5.6.160.0070.08720.46
5.6.150.0000.05318.25
5.6.140.0030.06718.18
5.6.130.0070.04718.18
5.6.120.0070.08721.13
5.6.110.0030.08720.99
5.6.100.0070.08321.02
5.6.90.0100.05320.89
5.6.80.0070.08020.42
5.5.350.0000.07320.45
5.5.340.0230.06017.93
5.5.330.0130.07320.41
5.5.320.3170.04320.27
5.5.310.0230.06320.20
5.5.300.0100.07717.98
5.5.290.0100.03717.96
5.5.280.0130.07720.75
5.5.270.0070.07320.80
5.5.260.0070.04020.85
5.5.250.0100.07720.63
5.5.240.0300.03720.17
5.4.450.0100.03319.21
5.4.440.0100.08019.30
5.4.430.0070.03719.56
5.4.420.0070.04719.54
5.4.410.0030.04019.20
5.4.400.0130.07019.01
5.4.390.0130.07719.16
5.4.380.0030.04018.85
5.4.370.0100.05719.01
5.4.360.0100.07319.24
5.4.350.0000.08018.93
5.4.340.0000.05318.85
5.4.320.0170.07018.98
5.4.310.0070.04719.25
5.4.300.0030.05019.14
5.4.290.0030.04019.14
5.4.280.0070.05019.14
5.4.270.0100.07318.85
5.4.260.0100.07718.85
5.4.250.0070.08019.14
5.4.240.0070.07719.23
5.4.230.0070.07019.14
5.4.220.0030.07319.23
5.4.210.0070.04018.86
5.4.200.0070.07319.27
5.4.190.0100.07018.86
5.4.180.0070.04318.96
5.4.170.0070.06319.14
5.4.160.0030.04719.18
5.4.150.0030.04019.13
5.4.140.0130.07016.47
5.4.130.0030.07316.34
5.4.120.0030.06316.46
5.4.110.0100.05716.44
5.4.100.0170.06716.48
5.4.90.0070.05016.44
5.4.80.0070.03716.34
5.4.70.0100.05716.43
5.4.60.0070.07016.27
5.4.50.0030.05716.35
5.4.40.0000.06316.31
5.4.30.0100.07016.38
5.4.20.0100.06716.53
5.4.10.0030.04716.41
5.4.00.0070.03315.79
5.3.290.0070.07314.73
5.3.280.0130.04014.63
5.3.270.0000.06714.50
5.3.260.0000.04714.67
5.3.250.0000.05014.62
5.3.240.0070.07714.61
5.3.230.0030.04014.52
5.3.220.0100.06014.58
5.3.210.0030.08314.63
5.3.200.0030.08014.64
5.3.190.0070.07314.48
5.3.180.0000.05314.61
5.3.170.0070.03314.61
5.3.160.0030.07314.57
5.3.150.0070.07014.60
5.3.140.0070.07714.63
5.3.130.0070.05314.57
5.3.120.0100.07714.56
5.3.110.0100.05314.63
5.3.100.0070.07014.09
5.3.90.0070.03713.96
5.3.80.0170.06314.02
5.3.70.0100.07014.02
5.3.60.0130.06714.05
5.3.50.0030.05314.10
5.3.40.0100.03714.01
5.3.30.0100.03714.00
5.3.20.0200.03313.79
5.3.10.0030.04313.55
5.3.00.0100.05313.70
5.2.170.0070.06311.20
5.2.160.0070.05011.20
5.2.150.0070.03311.29
5.2.140.0030.03311.18
5.2.130.0170.05711.18
5.2.120.0030.04711.05
5.2.110.0030.06310.99
5.2.100.0030.05711.10
5.2.90.0030.04711.26
5.2.80.0030.06711.17
5.2.70.0030.05711.06
5.2.60.0070.06311.04
5.2.50.0000.05711.07
5.2.40.0070.04011.14
5.2.30.0030.06310.86
5.2.20.0100.05310.95
5.2.10.0030.05710.82
5.2.00.0070.05310.71
5.1.60.0100.04010.01
5.1.50.0130.04010.01
5.1.40.0030.0379.99
5.1.30.0070.04710.50
5.1.20.0070.05310.42
5.1.10.0030.03710.13
5.1.00.0070.05010.04
5.0.50.0070.0338.72
5.0.40.0000.0378.72
5.0.30.0030.0338.72
5.0.20.0070.0338.72
5.0.10.0000.0238.72
5.0.00.0070.0608.72
4.4.90.0030.0378.72
4.4.80.0030.0308.72
4.4.70.0070.0338.72
4.4.60.0030.0178.72
4.4.50.0030.0178.72
4.4.40.0000.0578.72
4.4.30.0030.0338.72
4.4.20.0000.0408.72
4.4.10.0030.0208.72
4.4.00.0070.0478.72
4.3.110.0030.0308.72
4.3.100.0000.0378.72
4.3.90.0000.0178.72
4.3.80.0070.0278.72
4.3.70.0000.0278.72
4.3.60.0030.0308.72
4.3.50.0000.0408.72
4.3.40.0000.0308.72
4.3.30.0000.0308.72
4.3.20.0030.0208.72
4.3.10.0000.0238.72
4.3.00.0030.0308.72

preferences:
101.53 ms | 400 KiB | 5 Q