3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { static function bar() { $foo = static function() { //var_dump( $this ); return get_called_class(); }; return $foo(); } function baz() { $foo = function() { // print "baz: " . var_dump( $this); return get_called_class(); }; return $foo(); } } class Bar extends Foo { } // assert(Bar::bar() === 'Bar'); // assert(Bar::baz() === 'Bar'); Bar::baz();

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.0110.00418.43
8.3.50.0130.00721.21
8.3.40.0130.00318.83
8.3.30.0150.00018.88
8.3.20.0040.01518.74
8.3.10.0100.00321.04
8.3.00.0040.00421.60
8.2.180.0160.00016.38
8.2.170.0110.00322.96
8.2.160.0100.00720.39
8.2.150.0050.00324.18
8.2.140.0060.00324.66
8.2.130.0070.00026.16
8.2.120.0040.00421.06
8.2.110.0070.00320.45
8.2.100.0060.00617.88
8.2.90.0040.00419.22
8.2.80.0050.00317.97
8.2.70.0050.00517.13
8.2.60.0040.00417.93
8.2.50.0000.00818.07
8.2.40.0040.00418.22
8.2.30.0040.00319.48
8.2.20.0080.00017.65
8.2.10.0000.00717.63
8.2.00.0070.00317.67
8.1.280.0040.01125.92
8.1.270.0040.00423.99
8.1.260.0050.00226.35
8.1.250.0040.00428.09
8.1.240.0070.00322.42
8.1.230.0040.00720.95
8.1.220.0040.00418.77
8.1.210.0040.00418.92
8.1.200.0000.00917.22
8.1.190.0050.00217.53
8.1.180.0040.00418.10
8.1.170.0000.00818.50
8.1.160.0000.00718.77
8.1.150.0030.00718.50
8.1.140.0040.00417.25
8.1.130.0000.00717.75
8.1.120.0000.00717.32
8.1.110.0000.00817.27
8.1.100.0000.00717.28
8.1.90.0020.00517.34
8.1.80.0040.00417.28
8.1.70.0000.00817.35
8.1.60.0040.00417.54
8.1.50.0070.00017.28
8.1.40.0000.00917.34
8.1.30.0060.00317.45
8.1.20.0090.00017.45
8.1.10.0050.00217.46
8.1.00.0030.00617.45
8.0.300.0050.00220.09
8.0.290.0000.00717.05
8.0.280.0040.00418.42
8.0.270.0040.00417.15
8.0.260.0030.00316.68
8.0.250.0030.00516.92
8.0.240.0040.00716.93
8.0.230.0000.00716.99
8.0.220.0070.00016.91
8.0.210.0040.00416.84
8.0.200.0060.00016.83
8.0.190.0040.00416.95
8.0.180.0000.00716.92
8.0.170.0030.00316.94
8.0.160.0030.00316.93
8.0.150.0040.00416.79
8.0.140.0070.00016.87
8.0.130.0030.00313.27
8.0.120.0070.00016.80
8.0.110.0040.00416.79
8.0.100.0040.00416.89
8.0.90.0040.00416.88
8.0.80.0070.01016.91
8.0.70.0050.00316.78
8.0.60.0040.00416.79
8.0.50.0040.00416.92
8.0.30.0100.01016.99
8.0.20.0120.00717.40
8.0.10.0000.00916.91
8.0.00.0080.01116.75
7.4.330.0000.00516.84
7.4.320.0070.00016.54
7.4.300.0040.00416.55
7.4.290.0040.00416.53
7.4.280.0040.00416.55
7.4.270.0030.00316.41
7.4.260.0000.00513.28
7.4.250.0040.00416.42
7.4.240.0000.00716.54
7.4.230.0000.00716.59
7.4.220.0110.00816.57
7.4.210.0070.00916.59
7.4.200.0000.00816.58
7.4.190.0000.00716.73
7.4.160.0090.00616.43
7.4.150.0060.01317.40
7.4.140.0130.00717.86
7.4.130.0070.01016.47
7.4.120.0090.01116.42
7.4.110.0030.01316.56
7.4.100.0190.00416.50
7.4.90.0110.00716.54
7.4.80.0190.03219.39
7.4.70.0170.00016.46
7.4.60.0030.01916.50
7.4.50.0040.00416.45
7.4.40.0100.00722.77
7.4.30.0070.01016.29
7.4.00.0000.01414.84
7.3.330.0030.00313.18
7.3.320.0000.00513.33
7.3.310.0030.00516.35
7.3.300.0070.00016.30
7.3.290.0120.00316.37
7.3.280.0090.00716.36
7.3.270.0100.01317.40
7.3.260.0110.01018.24
7.3.250.0090.00916.50
7.3.240.0030.01316.59
7.3.230.0070.01016.61
7.3.210.0070.01016.29
7.3.200.0040.01219.39
7.3.190.0090.01316.61
7.3.180.0060.00916.32
7.3.170.0070.01116.38
7.3.160.0080.00816.37
7.3.120.0070.00714.70
7.2.330.0030.01416.74
7.2.320.0100.01316.66
7.2.310.0060.01616.25
7.2.300.0050.01216.53
7.2.290.0030.01516.54
7.2.60.0030.00916.82
7.2.00.0000.01319.10
7.1.200.0100.00315.43
7.1.100.0110.00417.95
7.1.70.0000.01017.23
7.1.60.0070.01819.40
7.1.50.0060.00616.71
7.1.00.0000.03722.43
7.0.200.0000.00716.38
7.0.140.0100.07022.06
7.0.100.0000.04719.95
7.0.90.0230.08319.98
7.0.80.0130.08719.87
7.0.70.0200.07719.97
7.0.60.0170.07319.92
7.0.50.0270.08020.35
7.0.40.0170.07020.13
7.0.30.0000.09320.03
7.0.20.0070.08320.08
7.0.10.0170.07720.16
7.0.00.0070.09020.09
5.6.280.0070.07021.04
5.6.250.0070.03720.61
5.6.240.0100.08320.70
5.6.230.0030.07320.75
5.6.220.0070.07720.68
5.6.210.0070.06720.68
5.6.200.0100.06720.95
5.6.190.0130.08021.15
5.6.180.0270.06020.95
5.6.170.0100.08320.95
5.6.160.0070.05021.05
5.6.150.0070.08321.05
5.6.140.0170.05720.96
5.6.130.0270.04720.98
5.6.120.0070.08321.02
5.6.110.0130.08021.11
5.6.100.0070.08321.14
5.6.90.0230.05321.08
5.6.80.0070.08020.48
5.6.70.0100.07720.46
5.6.60.0100.07320.33
5.6.50.0070.05320.34
5.6.40.0000.06720.43
5.6.30.0070.04020.50
5.6.20.0100.07720.30
5.6.10.0130.06020.50
5.6.00.0070.04720.29
5.5.380.0070.08720.43
5.5.370.0100.08320.43
5.5.360.0100.07720.42
5.5.350.0070.04320.46
5.5.340.0070.08020.77
5.5.330.0100.08020.89
5.5.320.0070.06320.65
5.5.310.0200.04720.93
5.5.300.0030.07720.88
5.5.290.0170.03720.92
5.5.280.0000.09320.84
5.5.270.0200.07020.78
5.5.260.0100.05020.89
5.5.250.0000.07020.59
5.5.240.0130.06720.15
5.5.230.0070.04720.27
5.5.220.0200.06320.21
5.5.210.0130.06020.29
5.5.200.0170.06320.12
5.5.190.0130.07020.20
5.5.180.0130.04319.99
5.5.160.0030.04719.99
5.5.150.0130.05020.23
5.5.140.0200.07320.28
5.5.130.0030.08020.24
5.5.120.0070.04020.27
5.5.110.0200.06720.13
5.5.100.0070.06320.03
5.5.90.0070.07720.11
5.5.80.0030.07020.13
5.5.70.0030.03720.13
5.5.60.0130.04720.09
5.5.50.0000.05320.14
5.5.40.0070.03720.10
5.5.30.0170.06720.04
5.5.20.0170.06720.13
5.5.10.0100.04020.10
5.5.00.0200.06019.96
5.4.450.0130.07719.45
5.4.440.0130.07719.20
5.4.430.0000.05019.45
5.4.420.0070.04319.41
5.4.410.0100.07719.40
5.4.400.0200.06019.13
5.4.390.0000.06718.84
5.4.380.0000.05319.23
5.4.370.0070.07319.03
5.4.360.0070.06318.88
5.4.350.0170.03719.04
5.4.340.0100.06318.88
5.4.320.0100.06719.04
5.4.310.0100.06719.07
5.4.300.0170.04719.23
5.4.290.0130.05319.12
5.4.280.0030.04718.92
5.4.270.0030.07019.05
5.4.260.0100.07018.94
5.4.250.0070.08019.02
5.4.240.0100.06719.22
5.4.230.0030.07719.02
5.4.220.0070.07719.20
5.4.210.0030.03719.05
5.4.200.0070.07719.01
5.4.190.0130.07319.04
5.4.180.0000.03719.22
5.4.170.0030.04319.04
5.4.160.0030.08019.19
5.4.150.0070.07718.88
5.4.140.0100.07016.51
5.4.130.0100.06716.45
5.4.120.0130.02316.38
5.4.110.0000.06716.38
5.4.100.0100.06716.56
5.4.90.0100.07016.56
5.4.80.0100.03716.55
5.4.70.0070.06316.53
5.4.60.0100.06716.50
5.4.50.0030.04316.25
5.4.40.0030.08016.50
5.4.30.0030.06016.48
5.4.20.0100.06716.52
5.4.10.0070.07016.36
5.4.00.0100.06315.85
5.3.290.0000.05014.73
5.3.280.0100.07314.58
5.3.270.0030.07014.58
5.3.260.0130.07714.71
5.3.250.0030.04714.63
5.3.240.0170.07014.62
5.3.230.0100.03314.70
5.3.220.0030.04314.57
5.3.210.0070.06314.63
5.3.200.0030.07714.49
5.3.190.0030.06014.66
5.3.180.0130.03714.66
5.3.170.0070.08314.49
5.3.160.0100.07314.58
5.3.150.0100.08014.49
5.3.140.0170.07014.57
5.3.130.0070.04014.64
5.3.120.0100.04014.61
5.3.110.0030.05714.65
5.3.100.0130.06314.14
5.3.90.0070.07013.95
5.3.80.0000.08014.09
5.3.70.0170.03314.14
5.3.60.0130.04714.02
5.3.50.0100.06013.94
5.3.40.0100.04014.08
5.3.30.0030.03713.91
5.3.20.0030.04713.70
5.3.10.0030.04013.70
5.3.00.0070.03713.57
5.2.170.0130.03711.07
5.2.160.0130.03711.00
5.2.150.0070.05011.26
5.2.140.0070.05710.99
5.2.130.0030.05010.98
5.2.120.0070.05711.15
5.2.110.0170.02011.10
5.2.100.0030.05311.15
5.2.90.0070.05311.23
5.2.80.0070.03011.11
5.2.70.0170.02011.02
5.2.60.0130.05010.96
5.2.50.0070.06311.14
5.2.40.0070.04710.90
5.2.30.0100.02311.00
5.2.20.0030.03710.98
5.2.10.0100.02310.79
5.2.00.0030.03010.72
5.1.60.0130.01310.11
5.1.50.0100.04010.03
5.1.40.0000.05310.04
5.1.30.0030.03710.39
5.1.20.0030.06010.40
5.1.10.0000.05710.08
5.1.00.0100.02310.06
5.0.50.0030.0438.54
5.0.40.0070.0208.25
5.0.30.0030.0378.25
5.0.20.0030.0438.28
5.0.10.0000.0208.10
5.0.00.0030.0638.25
4.4.90.0000.0338.10
4.4.80.0030.0378.10
4.4.70.0000.0278.10
4.4.60.0070.0178.10
4.4.50.0070.0338.10
4.4.40.0030.0478.10
4.4.30.0030.0338.10
4.4.20.0030.0338.10
4.4.10.0000.0408.10
4.4.00.0130.0338.10
4.3.110.0000.0338.10
4.3.100.0030.0378.10
4.3.90.0000.0278.10
4.3.80.0030.0508.10
4.3.70.0000.0178.10
4.3.60.0000.0138.10
4.3.50.0000.0378.10
4.3.40.0000.0278.10
4.3.30.0030.0208.10
4.3.20.0000.0178.10
4.3.10.0000.0278.10
4.3.00.0000.0338.10

preferences:
65.65 ms | 401 KiB | 5 Q