3v4l.org

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

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.0120.00316.58
8.3.60.0090.00618.31
8.3.50.0130.00522.05
8.3.40.0060.00918.84
8.3.30.0080.00818.71
8.3.20.0090.00018.82
8.3.10.0030.00520.79
8.3.00.0040.00421.81
8.2.180.0140.00716.75
8.2.170.0110.00822.96
8.2.160.0030.01020.52
8.2.150.0060.00324.18
8.2.140.0070.00024.66
8.2.130.0070.00026.16
8.2.120.0040.00421.11
8.2.110.0060.00320.43
8.2.100.0070.00317.84
8.2.90.0000.00919.22
8.2.80.0040.00417.97
8.2.70.0060.00317.50
8.2.60.0030.00517.92
8.2.50.0000.00818.07
8.2.40.0050.00218.09
8.2.30.0070.00319.41
8.2.20.0040.00417.74
8.2.10.0080.00017.57
8.2.00.0040.00417.57
8.1.280.0120.00325.92
8.1.270.0090.00023.99
8.1.260.0030.00626.35
8.1.250.0040.00428.09
8.1.240.0060.00322.38
8.1.230.0060.00620.89
8.1.220.0090.00018.77
8.1.210.0050.00318.96
8.1.200.0000.00817.23
8.1.190.0070.00017.53
8.1.180.0000.00818.10
8.1.170.0080.00018.55
8.1.160.0050.00218.90
8.1.150.0100.00018.64
8.1.140.0040.00417.40
8.1.130.0050.00317.83
8.1.120.0070.00017.49
8.1.110.0000.00817.32
8.1.100.0050.00217.40
8.1.90.0070.00017.36
8.1.80.0040.00417.48
8.1.70.0030.00317.46
8.1.60.0040.00417.48
8.1.50.0000.00817.55
8.1.40.0000.00817.43
8.1.30.0030.00617.63
8.1.20.0030.00517.57
8.1.10.0000.00717.59
8.1.00.0030.00617.41
8.0.300.0050.00319.89
8.0.290.0040.00417.05
8.0.280.0000.00718.35
8.0.270.0050.00317.22
8.0.260.0070.00016.82
8.0.250.0080.00016.91
8.0.240.0020.00916.98
8.0.230.0040.00416.79
8.0.220.0000.00716.88
8.0.210.0090.00016.95
8.0.200.0000.00716.94
8.0.190.0000.00816.95
8.0.180.0040.00416.98
8.0.170.0000.00716.91
8.0.160.0040.00416.94
8.0.150.0050.00316.94
8.0.140.0040.00816.85
8.0.130.0030.00313.31
8.0.120.0000.00716.81
8.0.110.0050.00216.75
8.0.100.0000.00716.75
8.0.90.0000.00816.84
8.0.80.0060.00916.87
8.0.70.0000.00716.84
8.0.60.0000.00716.88
8.0.50.0040.00416.91
8.0.30.0090.00917.06
8.0.20.0110.00917.40
8.0.10.0040.00417.13
8.0.00.0110.00816.83
7.4.330.0030.00316.82
7.4.320.0030.00316.63
7.4.300.0000.00616.65
7.4.290.0000.00716.55
7.4.280.0050.00216.64
7.4.270.0030.00316.52
7.4.260.0000.00513.17
7.4.250.0080.00016.61
7.4.240.0000.00716.59
7.4.230.0000.00716.48
7.4.220.0100.01616.47
7.4.210.0060.01116.57
7.4.200.0030.00316.61
7.4.190.0030.00316.70
7.4.160.0110.01116.67
7.4.150.0120.00617.40
7.4.140.0050.01217.86
7.4.130.0100.00816.47
7.4.120.0070.01016.60
7.4.110.0090.01216.54
7.4.100.0110.01416.45
7.4.90.0090.00916.51
7.4.80.0080.00819.39
7.4.70.0130.00716.59
7.4.60.0130.00316.54
7.4.50.0000.00416.21
7.4.40.0090.00622.77
7.4.30.0100.00716.49
7.4.00.0050.00514.75
7.3.330.0050.00013.16
7.3.320.0000.00513.16
7.3.310.0000.00616.14
7.3.300.0070.00016.15
7.3.290.0100.00316.26
7.3.280.0080.00916.26
7.3.270.0070.01717.40
7.3.260.0110.00618.24
7.3.250.0120.00816.33
7.3.240.0130.00316.43
7.3.230.0040.01216.45
7.3.210.0030.01316.25
7.3.200.0130.01019.39
7.3.190.0030.01716.32
7.3.180.0080.01316.29
7.3.170.0100.00716.58
7.3.160.0030.01316.31
7.3.120.0030.01314.76
7.2.330.0130.00616.61
7.2.320.0090.00916.70
7.2.310.0160.00316.76
7.2.300.0070.01416.70
7.2.290.0060.01016.43
7.2.80.0070.01116.38
7.1.200.0060.00615.87
7.1.70.0040.00417.05
7.1.60.0130.00719.17
7.1.50.0080.01516.78
7.1.00.0070.03322.34
7.0.200.0040.00416.83
7.0.140.0100.06322.21
7.0.110.0500.05719.94
7.0.100.0430.07320.05
7.0.90.0700.07319.89
7.0.80.0700.07719.82
7.0.70.0730.07319.83
7.0.60.0570.08019.88
7.0.50.0530.07720.02
7.0.40.0100.08019.62
7.0.30.0270.05719.80
7.0.20.0070.08719.77
7.0.10.0200.06719.59
7.0.00.0030.06719.79
5.6.280.0000.07721.03
5.6.260.0070.04020.54
5.6.250.0100.07720.66
5.6.240.0030.09020.54
5.6.230.0130.07020.82
5.6.220.0070.05020.81
5.6.210.0130.07720.57
5.6.200.0130.07720.68
5.6.190.0030.05020.61
5.6.180.0070.06720.62
5.6.170.0100.07020.65
5.6.160.0130.08020.62
5.6.150.0100.05320.64
5.6.140.0100.08320.60
5.6.130.0100.08320.51
5.6.120.0070.08720.64
5.6.110.0000.08720.57
5.6.100.0100.05720.55
5.6.90.0130.07020.50
5.6.80.0070.04719.90
5.6.70.0070.03719.89
5.6.60.0130.06720.04
5.6.50.0030.04319.97
5.6.40.0100.05019.91
5.6.30.0070.03719.96
5.6.20.0070.03720.17
5.6.10.0030.04019.93
5.6.00.0100.03019.97
5.5.380.0100.07317.56
5.5.370.0100.07017.53
5.5.360.0100.08017.50
5.5.350.0030.07717.62
5.5.340.0070.07718.10
5.5.330.0070.08018.13
5.5.320.0100.07317.93
5.5.310.0130.07017.91
5.5.300.0070.08018.23
5.5.290.0070.07717.91
5.5.280.0070.07017.91
5.5.270.0130.07318.07
5.5.260.0070.06717.92
5.5.250.0100.07017.91
5.5.240.0070.07717.31
5.5.230.0070.08017.48
5.5.220.0030.06717.60
5.5.210.0000.04317.48
5.5.200.0130.04017.28
5.5.190.0070.05317.18
5.5.180.0070.04017.48
5.5.160.0000.04017.22
5.5.150.0070.03717.27
5.5.140.0000.04317.43
5.5.130.0000.04317.57
5.5.120.0030.05717.26
5.5.110.0100.04017.28
5.5.100.0030.05317.38
5.5.90.0000.05317.16
5.5.80.0070.07317.47
5.5.70.0070.04017.38
5.5.60.0030.04017.50
5.5.50.0100.04017.14
5.5.40.0070.03317.34
5.5.30.0070.04317.29
5.5.20.0070.03017.46
5.5.10.0070.03017.15
5.5.00.0100.07717.46
5.4.450.0100.07319.31
5.4.440.0030.08319.59
5.4.430.0030.06319.22
5.4.420.0230.04719.29
5.4.410.0130.07019.32
5.4.400.0170.07018.96
5.4.390.0130.07018.94
5.4.380.0100.03318.96
5.4.370.0000.05318.96
5.4.360.0030.04019.14
5.4.350.0030.04019.09
5.4.340.0030.04319.13
5.4.320.0030.03318.95
5.4.310.0030.03718.96
5.4.300.0030.04019.18
5.4.290.0030.04018.99
5.4.280.0070.05018.91
5.4.270.0000.04319.08
5.4.260.0100.03319.13
5.4.250.0070.03319.09
5.4.240.0070.03718.96
5.4.230.0030.05319.28
5.4.220.0000.04719.28
5.4.210.0000.04318.93
5.4.200.0000.04019.28
5.4.190.0170.06719.03
5.4.180.0030.03719.25
5.4.170.0030.04718.89
5.4.160.0030.03719.02
5.4.150.0030.04719.09
5.4.140.0030.03016.29
5.4.130.0070.03316.33
5.4.120.0070.03716.59
5.4.110.0030.04016.52
5.4.100.0030.03716.51
5.4.90.0000.04316.47
5.4.80.0070.03316.56
5.4.70.0070.03316.42
5.4.60.0070.03316.20
5.4.50.0000.03716.48
5.4.40.0030.03716.37
5.4.30.0030.03716.19
5.4.20.0100.06016.44
5.4.10.0030.03716.49
5.4.00.0030.05315.93
5.3.290.0000.04014.68
5.3.280.0070.03014.62
5.3.270.0070.03714.46
5.3.260.0070.03314.68
5.3.250.0070.03314.69
5.3.240.0000.04014.74
5.3.230.0000.04014.61
5.3.220.0000.07714.56
5.3.210.0030.03314.57
5.3.200.0070.03014.54
5.3.190.0070.03314.58
5.3.180.0000.04014.79
5.3.170.0100.03314.57
5.3.160.0070.03014.57
5.3.150.0030.03714.42
5.3.140.0000.03714.41
5.3.130.0070.04014.55
5.3.120.0030.06014.54
5.3.110.0000.06014.53
5.3.100.0070.07014.07
5.3.90.0070.07714.02
5.3.80.0030.04014.16
5.3.70.0030.03714.10
5.3.60.0100.07014.08
5.3.50.0200.06014.17
5.3.40.0130.06714.07
5.3.30.0130.06013.90
5.3.20.0070.07313.72
5.3.10.0070.07313.68
5.3.00.0070.06713.73
5.2.170.0070.05311.36
5.2.160.0030.05311.17
5.2.150.0070.05311.13
5.2.140.0030.03711.09
5.2.130.0100.05011.11
5.2.120.0030.03311.09
5.2.110.0070.06311.32
5.2.100.0100.05311.16
5.2.90.0100.03311.32
5.2.80.0070.06311.11
5.2.70.0030.07011.23
5.2.60.0030.06311.20
5.2.50.0070.05711.25
5.2.40.0000.06010.99
5.2.30.0070.06010.99
5.2.20.0000.06711.05
5.2.10.0100.05711.01
5.2.00.0030.06310.68
5.1.60.0070.05310.05
5.1.50.0070.05010.24
5.1.40.0100.05010.15
5.1.30.0070.05710.47
5.1.20.0000.03310.38
5.1.10.0100.05310.15
5.1.00.0070.0409.89
5.0.50.0030.0478.70
5.0.40.0070.0338.57
5.0.30.0000.0638.21
5.0.20.0030.0408.20
5.0.10.0000.0478.18
5.0.00.0000.0678.23
4.4.90.0100.0276.99
4.4.80.0070.0306.99
4.4.70.0070.0336.99
4.4.60.0000.0376.99
4.4.50.0000.0206.99
4.4.40.0000.0576.99
4.4.30.0000.0376.99
4.4.20.0000.0376.99
4.4.10.0030.0336.99
4.4.00.0030.0336.99
4.3.110.0030.0336.99
4.3.100.0000.0276.99
4.3.90.0030.0276.99
4.3.80.0030.0506.99
4.3.70.0030.0336.99
4.3.60.0000.0276.99
4.3.50.0030.0336.99
4.3.40.0030.0476.99
4.3.30.0000.0376.99
4.3.20.0000.0276.99
4.3.10.0000.0306.99
4.3.00.0000.0176.99

preferences:
51.72 ms | 401 KiB | 5 Q