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 = static function() { return get_called_class(); }; $oFoo=new Foo; return $foo(); } } class Bar extends Foo { } //print Bar::bar() . Bar::baz() . $reb= Bar::rebind(); print $reb(); // 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.60.0070.01418.68
8.3.50.0100.01121.15
8.3.40.0090.00918.69
8.3.30.0090.00618.67
8.3.20.0040.00418.95
8.3.10.0000.00821.05
8.3.00.0040.00421.89
8.2.180.0090.00616.48
8.2.170.0070.00722.96
8.2.160.0080.00620.35
8.2.150.0000.00824.18
8.2.140.0080.00024.66
8.2.130.0000.00726.16
8.2.120.0030.00619.27
8.2.110.0070.00320.38
8.2.100.0040.00817.91
8.2.90.0040.00419.10
8.2.80.0000.00817.97
8.2.70.0030.00517.75
8.2.60.0040.00418.04
8.2.50.0030.00518.07
8.2.40.0050.00318.09
8.2.30.0000.00721.13
8.2.20.0040.00417.72
8.2.10.0050.00317.68
8.2.00.0080.00317.70
8.1.280.0100.00725.92
8.1.270.0040.00423.99
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0030.00622.31
8.1.230.0000.01120.92
8.1.220.0080.00018.77
8.1.210.0000.00819.03
8.1.200.0090.00017.35
8.1.190.0040.00417.53
8.1.180.0080.00018.10
8.1.170.0000.00818.59
8.1.160.0030.00418.89
8.1.150.0000.00918.71
8.1.140.0040.00417.45
8.1.130.0030.00317.82
8.1.120.0100.00017.46
8.1.110.0020.00517.45
8.1.100.0000.00817.35
8.1.90.0030.00517.50
8.1.80.0030.00317.52
8.1.70.0030.00317.43
8.1.60.0000.00817.54
8.1.50.0040.00417.38
8.1.40.0040.00417.41
8.1.30.0050.00317.62
8.1.20.0030.00617.67
8.1.10.0020.00517.45
8.1.00.0080.00017.50
8.0.300.0000.00719.77
8.0.290.0040.00417.05
8.0.280.0080.00018.40
8.0.270.0000.00717.25
8.0.260.0040.00416.75
8.0.250.0030.00516.98
8.0.240.0000.00816.88
8.0.230.0000.00916.91
8.0.220.0030.00316.96
8.0.210.0070.00016.88
8.0.200.0030.00316.88
8.0.190.0000.00716.92
8.0.180.0030.00316.84
8.0.170.0000.00816.91
8.0.160.0040.00417.03
8.0.150.0030.00316.90
8.0.140.0030.00616.82
8.0.130.0030.00313.38
8.0.120.0000.00816.89
8.0.110.0030.00616.80
8.0.100.0000.00716.95
8.0.90.0000.00716.97
8.0.80.0060.00916.95
8.0.70.0000.00816.96
8.0.60.0040.00417.08
8.0.50.0030.00616.90
8.0.30.0120.01017.16
8.0.20.0120.00617.45
8.0.10.0000.00717.13
8.0.00.0080.01316.85
7.4.330.0060.00016.66
7.4.320.0060.00316.59
7.4.300.0000.00716.59
7.4.290.0030.00516.52
7.4.280.0050.00316.51
7.4.270.0030.00516.51
7.4.260.0030.00313.22
7.4.250.0000.00816.58
7.4.240.0070.00016.54
7.4.230.0000.00716.46
7.4.220.0180.00716.43
7.4.210.0050.01016.58
7.4.200.0020.00516.50
7.4.190.0030.00316.43
7.4.160.0100.00716.55
7.4.150.0130.00617.40
7.4.140.0160.00217.86
7.4.130.0120.00816.59
7.4.120.0080.01116.56
7.4.110.0120.00616.46
7.4.100.0030.01616.50
7.4.90.0130.01016.64
7.4.80.0030.01319.39
7.4.70.0070.01016.40
7.4.60.0170.00016.60
7.4.50.0080.00016.50
7.4.40.0120.00322.77
7.4.30.0090.00916.58
7.4.00.0080.01015.07
7.3.330.0000.00513.16
7.3.320.0050.00213.20
7.3.310.0000.00716.37
7.3.300.0040.00416.30
7.3.290.0110.00316.38
7.3.280.0070.00916.36
7.3.270.0030.01317.40
7.3.260.0110.01018.24
7.3.250.0100.00616.46
7.3.240.0100.00616.37
7.3.230.0070.01016.64
7.3.210.0100.00716.42
7.3.200.0060.01219.39
7.3.190.0100.01016.41
7.3.180.0090.00616.54
7.3.170.0090.00616.50
7.3.160.0060.01016.50
7.3.120.0090.00815.00
7.3.110.0040.01514.95
7.3.100.0030.01014.87
7.3.90.0040.01114.91
7.3.80.0030.01014.80
7.3.70.0070.01014.86
7.3.60.0090.00014.87
7.3.50.0030.01014.64
7.3.40.0090.00614.73
7.3.30.0090.00914.88
7.3.20.0000.01416.73
7.3.10.0040.01116.63
7.3.00.0060.00916.62
7.2.330.0140.00316.74
7.2.320.0110.01116.58
7.2.310.0140.00916.46
7.2.300.0080.00816.42
7.2.290.0070.01016.39
7.2.250.0060.01214.60
7.2.240.0100.01015.16
7.2.230.0060.01215.05
7.2.220.0080.00414.86
7.2.210.0120.00614.96
7.2.200.0060.00814.80
7.2.190.0090.00314.71
7.2.180.0110.00715.14
7.2.170.0100.00314.92
7.2.60.0030.01016.86
7.2.00.0000.01119.31
7.1.330.0000.01415.73
7.1.320.0000.01215.64
7.1.310.0080.00815.85
7.1.300.0060.00915.81
7.1.290.0060.00915.29
7.1.280.0030.01015.47
7.1.270.0070.00715.60
7.1.260.0070.00715.43
7.1.200.0030.00915.57
7.1.100.0000.01317.86
7.1.70.0040.00416.87
7.1.60.0100.01019.40
7.1.50.0100.01416.99
7.1.00.0030.03322.48
7.0.200.0000.00716.83
7.0.140.0100.06722.00
7.0.100.0000.05319.99
7.0.90.0100.08019.96
7.0.80.0130.07319.84
7.0.70.0030.08319.98
7.0.60.0070.08719.96
7.0.50.0330.06020.18
7.0.40.0030.05720.11
7.0.30.0200.06720.11
7.0.20.0070.08020.09
7.0.10.0070.08720.11
7.0.00.0070.05020.08
5.6.280.0030.07320.79
5.6.250.0030.08020.51
5.6.240.0030.06720.65
5.6.230.0000.05720.69
5.6.220.0030.04320.58
5.6.210.0230.02720.73
5.6.200.0000.06720.98
5.6.190.0000.10021.05
5.6.180.0000.05720.98
5.6.170.0030.08321.04
5.6.160.0030.05021.12
5.6.150.0030.08721.10
5.6.140.0070.07321.12
5.6.130.0200.06721.06
5.6.120.0070.07021.03
5.6.110.0030.07720.96
5.6.100.0070.08321.18
5.6.90.0070.04021.05
5.6.80.0170.05720.43
5.6.70.0070.08320.43
5.6.60.0130.06320.33
5.6.50.0170.06320.38
5.6.40.0100.07720.45
5.6.30.0130.10020.32
5.6.20.0070.04720.33
5.6.10.0070.08020.41
5.6.00.0100.07320.43
5.5.380.0100.08020.41
5.5.370.0100.07320.38
5.5.360.0100.08020.35
5.5.350.0070.04320.41
5.5.340.0100.03320.77
5.5.330.0170.07320.75
5.5.320.0100.05320.88
5.5.310.0130.07720.93
5.5.300.0100.06020.95
5.5.290.0000.09320.89
5.5.280.0030.07020.92
5.5.270.0070.05320.92
5.5.260.0130.07720.87
5.5.250.0130.04020.63
5.5.240.0030.05020.14
5.5.230.0170.06720.13
5.5.220.0000.08320.27
5.5.210.0000.08020.30
5.5.200.0030.08320.28
5.5.190.0030.08020.10
5.5.180.0030.08720.16
5.5.160.0070.06320.25
5.5.150.0030.05320.27
5.5.140.0130.07320.26
5.5.130.0070.06320.25
5.5.120.0000.07320.13
5.5.110.0030.05020.12
5.5.100.0100.08020.00
5.5.90.0030.05320.11
5.5.80.0130.07720.17
5.5.70.0070.07720.07
5.5.60.0100.06320.10
5.5.50.0030.07020.17
5.5.40.0030.04320.13
5.5.30.0030.07720.06
5.5.20.0070.07320.06
5.5.10.0130.03720.02
5.5.00.0030.04320.14
5.4.450.0100.07719.33
5.4.440.0030.04319.51
5.4.430.0200.07019.35
5.4.420.0030.05019.41
5.4.410.0100.07319.24
5.4.400.0070.08019.14
5.4.390.0000.08319.14
5.4.380.0000.05018.95
5.4.370.0000.05019.11
5.4.360.0070.08019.09
5.4.350.0100.07319.04
5.4.340.0000.05319.14
5.4.320.0130.04719.04
5.4.310.0030.04718.90
5.4.300.0030.08319.07
5.4.290.0070.08019.14
5.4.280.0100.04319.04
5.4.270.0070.07318.84
5.4.260.0030.06719.02
5.4.250.0070.08018.84
5.4.240.0170.06318.94
5.4.230.0000.04319.02
5.4.220.0130.07018.87
5.4.210.0070.07719.08
5.4.200.0000.07319.02
5.4.190.0070.03319.04
5.4.180.0030.05719.17
5.4.170.0100.07319.22
5.4.160.0130.07019.02
5.4.150.0070.07718.83
5.4.140.0130.06316.51
5.4.130.0070.07316.38
5.4.120.0030.05016.50
5.4.110.0070.05716.44
5.4.100.0100.06316.54
5.4.90.0100.07016.32
5.4.80.0130.06716.36
5.4.70.0130.06716.47
5.4.60.0030.04316.48
5.4.50.0100.06316.47
5.4.40.0070.04016.41
5.4.30.0030.03716.29
5.4.20.0000.04716.45
5.4.10.0070.03716.43
5.4.00.0070.03715.77
5.3.290.0100.07014.68
5.3.280.0030.04314.64
5.3.270.0070.07314.74
5.3.260.0100.07314.74
5.3.250.0030.05714.61
5.3.240.0030.07014.69
5.3.230.0100.04014.63
5.3.220.0030.08014.68
5.3.210.0100.07314.49
5.3.200.0030.08314.66
5.3.190.0000.04314.57
5.3.180.0030.08014.57
5.3.170.0100.07314.58
5.3.160.0000.07714.49
5.3.150.0100.03714.63
5.3.140.0100.03314.66
5.3.130.0000.04014.60
5.3.120.0070.05314.49
5.3.110.0000.04014.69
5.3.100.0070.03314.13
5.3.90.0030.03714.08
5.3.80.0000.04014.08
5.3.70.0030.03714.04
5.3.60.0070.03714.06
5.3.50.0100.02713.87
5.3.40.0130.02713.87
5.3.30.0000.04013.89
5.3.20.0000.03713.80
5.3.10.0030.03713.59
5.3.00.0100.03013.70
5.2.170.0070.02311.22
5.2.160.0100.02311.28
5.2.150.0000.03011.24
5.2.140.0000.03011.14
5.2.130.0000.03711.08
5.2.120.0070.02311.11
5.2.110.0030.02711.03
5.2.100.0030.02711.23
5.2.90.0030.02711.20
5.2.80.0000.03010.99
5.2.70.0030.04010.95
5.2.60.0070.02710.96
5.2.50.0000.03011.08
5.2.40.0070.02711.09
5.2.30.0070.02310.90
5.2.20.0030.02711.10
5.2.10.0000.03010.89
5.2.00.0070.02010.73
5.1.60.0000.02710.08
5.1.50.0000.0309.98
5.1.40.0030.0239.86
5.1.30.0070.02010.26
5.1.20.0000.03010.41
5.1.10.0000.02710.06
5.1.00.0030.02310.14
5.0.50.0000.0239.52
5.0.40.0030.0339.52
5.0.30.0070.0239.52
5.0.20.0070.0139.52
5.0.10.0030.0209.52
5.0.00.0000.0339.52
4.4.90.0100.0209.52
4.4.80.0000.0179.52
4.4.70.0000.0239.52
4.4.60.0030.0139.52
4.4.50.0000.0139.52
4.4.40.0000.0279.52
4.4.30.0000.0179.52
4.4.20.0000.0139.52
4.4.10.0070.0109.52
4.4.00.0000.0279.52
4.3.110.0000.0209.52
4.3.100.0030.0139.52
4.3.90.0000.0209.52
4.3.80.0000.0239.52
4.3.70.0000.0279.52
4.3.60.0030.0109.52
4.3.50.0000.0179.52
4.3.40.0000.0239.52
4.3.30.0000.0179.52
4.3.20.0000.0209.52
4.3.10.0000.0179.52
4.3.00.0000.0139.52

preferences:
45.54 ms | 401 KiB | 5 Q