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 Bar; return $foo->bindTo($oFoo,'Bar'); } } 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.60.0030.01018.31
8.3.50.0140.00522.11
8.3.40.0130.00318.83
8.3.30.0100.00318.71
8.3.20.0080.00018.73
8.3.10.0000.00921.10
8.3.00.0000.00821.85
8.2.180.0070.01316.75
8.2.170.0040.01122.96
8.2.160.0140.00320.51
8.2.150.0090.00024.18
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0070.00021.14
8.2.110.0060.00321.12
8.2.100.0080.00317.78
8.2.90.0040.00419.22
8.2.80.0040.00418.04
8.2.70.0000.00817.50
8.2.60.0000.00817.89
8.2.50.0040.00418.07
8.2.40.0000.00817.84
8.2.30.0080.00021.17
8.2.20.0000.00717.55
8.2.10.0040.00417.75
8.2.00.0030.00617.75
8.1.280.0060.00925.92
8.1.270.0000.00723.99
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0030.00622.54
8.1.230.0120.00020.90
8.1.220.0000.00817.74
8.1.210.0000.00818.89
8.1.200.0030.00617.25
8.1.190.0090.00017.41
8.1.180.0000.00818.10
8.1.170.0080.00018.54
8.1.160.0000.00718.89
8.1.150.0000.00718.57
8.1.140.0040.00417.34
8.1.130.0000.00817.84
8.1.120.0030.00317.43
8.1.110.0000.00817.37
8.1.100.0070.00017.38
8.1.90.0040.00417.55
8.1.80.0000.00717.43
8.1.70.0000.00817.48
8.1.60.0080.00017.60
8.1.50.0000.00817.39
8.1.40.0000.00717.52
8.1.30.0030.00617.67
8.1.20.0090.00017.64
8.1.10.0000.00717.50
8.1.00.0070.00417.50
8.0.300.0080.00019.98
8.0.290.0000.00717.18
8.0.280.0070.00018.43
8.0.270.0070.00017.26
8.0.260.0030.00316.87
8.0.250.0000.00816.84
8.0.240.0060.00516.96
8.0.230.0000.00716.95
8.0.220.0030.00316.93
8.0.210.0040.00416.97
8.0.200.0040.00416.97
8.0.190.0000.00816.97
8.0.180.0000.00717.00
8.0.170.0030.00316.88
8.0.160.0000.00716.90
8.0.150.0040.00416.91
8.0.140.0000.00716.91
8.0.130.0030.00313.32
8.0.120.0050.00316.81
8.0.110.0040.00416.91
8.0.100.0000.00716.77
8.0.90.0070.00016.79
8.0.80.0060.00916.85
8.0.70.0040.00416.78
8.0.60.0040.00416.91
8.0.50.0040.00416.92
8.0.30.0180.00517.16
8.0.20.0110.00817.40
8.0.10.0070.00017.02
8.0.00.0120.01016.80
7.4.330.0020.00216.79
7.4.320.0060.00016.65
7.4.300.0070.00016.58
7.4.290.0000.00716.52
7.4.280.0070.00016.48
7.4.270.0030.00316.61
7.4.260.0030.00313.30
7.4.250.0050.00216.55
7.4.240.0030.00516.62
7.4.230.0040.00416.46
7.4.220.0090.00616.44
7.4.210.0080.00716.58
7.4.200.0030.00516.61
7.4.190.0000.00716.56
7.4.160.0030.01316.41
7.4.150.0140.00317.40
7.4.140.0120.00817.86
7.4.130.0120.00516.39
7.4.120.0110.00616.41
7.4.110.0060.01016.60
7.4.100.0100.00716.63
7.4.90.0130.01016.40
7.4.80.0090.01119.39
7.4.70.0070.01416.57
7.4.60.0100.00616.53
7.4.50.0030.00616.23
7.4.40.0090.00522.77
7.4.30.0060.01016.50
7.4.00.0050.01214.83
7.3.330.0000.00513.31
7.3.320.0030.00213.32
7.3.310.0000.00616.34
7.3.300.0000.00616.28
7.3.290.0110.00316.21
7.3.280.0100.00816.24
7.3.270.0100.01017.40
7.3.260.0180.00418.24
7.3.250.0120.00616.41
7.3.240.0070.01016.20
7.3.230.0170.00016.58
7.3.210.0070.01116.60
7.3.200.0090.01319.39
7.3.190.0120.00916.32
7.3.180.0040.01116.39
7.3.170.0060.00916.59
7.3.160.0030.01216.26
7.3.120.0080.00714.99
7.3.110.0060.01014.70
7.3.100.0030.01014.61
7.3.90.0140.00014.86
7.3.80.0070.00414.93
7.3.70.0090.00614.77
7.3.60.0110.00314.86
7.3.50.0070.01014.86
7.3.40.0030.00614.85
7.3.30.0000.01514.53
7.3.20.0030.00916.34
7.3.10.0000.01416.35
7.3.00.0110.00416.75
7.2.330.0110.01216.63
7.2.320.0060.01216.45
7.2.310.0070.01016.80
7.2.300.0120.01116.78
7.2.290.0120.00616.87
7.2.250.0190.00015.21
7.2.240.0030.01214.83
7.2.230.0110.00415.12
7.2.220.0090.00614.88
7.2.210.0070.00715.15
7.2.200.0090.00614.94
7.2.190.0060.00915.05
7.2.180.0140.00015.12
7.2.170.0040.01114.84
7.2.60.0030.01216.83
7.2.00.0000.01419.43
7.1.330.0070.00715.66
7.1.320.0030.01315.44
7.1.310.0040.01115.82
7.1.300.0040.01215.43
7.1.290.0000.01515.72
7.1.280.0040.00715.52
7.1.270.0070.00415.77
7.1.260.0030.01015.43
7.1.200.0030.01015.76
7.1.100.0000.01318.02
7.1.70.0000.00817.04
7.1.60.0070.01419.17
7.1.50.0090.01516.77
7.1.00.0000.03722.27
7.0.200.0000.00716.46
7.0.140.0130.06321.92
7.0.110.0100.04320.10
7.0.100.0030.08319.98
7.0.90.0030.08719.95
7.0.80.0070.05019.91
7.0.70.0030.08020.10
7.0.60.0030.04319.96
7.0.50.0030.08720.00
7.0.40.0030.05719.60
7.0.30.0000.04319.87
7.0.20.0030.08019.70
7.0.10.0100.05019.81
7.0.00.0030.07319.69
5.6.280.0030.07021.08
5.6.260.0070.04020.62
5.6.250.0000.04720.70
5.6.240.0030.08720.68
5.6.230.0170.07320.68
5.6.220.0070.06020.71
5.6.210.0130.07320.73
5.6.200.0070.06320.57
5.6.190.0070.07720.66
5.6.180.0070.04020.61
5.6.170.0000.04320.67
5.6.160.0070.06320.67
5.6.150.0100.07720.58
5.6.140.0030.04320.58
5.6.130.0130.04020.57
5.6.120.0100.06320.57
5.6.110.0030.07720.67
5.6.100.0030.06020.64
5.6.90.0100.04720.61
5.6.80.0070.04319.86
5.6.70.0030.06720.08
5.6.60.0130.07319.97
5.6.50.0070.05320.02
5.6.40.0070.07019.84
5.6.30.0130.07019.99
5.6.20.0070.03719.94
5.6.10.0070.06319.96
5.6.00.0030.06719.99
5.5.380.0030.06717.54
5.5.370.0000.05717.70
5.5.360.0000.07317.55
5.5.350.0070.05717.63
5.5.340.0000.06318.13
5.5.330.0030.06318.05
5.5.320.0030.04318.10
5.5.310.0000.05018.13
5.5.300.0130.05318.10
5.5.290.0070.07018.07
5.5.280.0130.05318.10
5.5.270.0070.03718.22
5.5.260.0100.07718.13
5.5.250.0070.07317.91
5.5.240.0100.06717.34
5.5.230.0030.04017.45
5.5.220.0030.05017.47
5.5.210.0100.07317.31
5.5.200.0030.03317.46
5.5.190.0030.06717.28
5.5.180.0100.03717.45
5.5.160.0000.04317.49
5.5.150.0070.06717.28
5.5.140.0030.07317.48
5.5.130.0000.03717.28
5.5.120.0070.03317.18
5.5.110.0030.08017.44
5.5.100.0030.05017.19
5.5.90.0130.04717.16
5.5.80.0030.03717.17
5.5.70.0030.04017.47
5.5.60.0130.02717.34
5.5.50.0070.05017.34
5.5.40.0070.03717.34
5.5.30.0000.03717.17
5.5.20.0130.05317.33
5.5.10.0000.04017.46
5.5.00.0000.03717.28
5.4.450.0070.08019.49
5.4.440.0070.04319.32
5.4.430.0070.03719.50
5.4.420.0100.05319.32
5.4.410.0030.04319.19
5.4.400.0030.08019.19
5.4.390.0030.07319.17
5.4.380.0070.06319.34
5.4.370.0030.04719.23
5.4.360.0030.03319.34
5.4.350.0100.04019.00
5.4.340.0070.04019.04
5.4.320.0100.06018.98
5.4.310.0070.03719.34
5.4.300.0030.03319.23
5.4.290.0100.06318.99
5.4.280.0000.07319.23
5.4.270.0030.07718.98
5.4.260.0030.08019.03
5.4.250.0030.03319.01
5.4.240.0000.03718.95
5.4.230.0030.03719.30
5.4.220.0100.07719.21
5.4.210.0030.06319.13
5.4.200.0070.04019.08
5.4.190.0030.06019.30
5.4.180.0000.06319.00
5.4.170.0030.05019.32
5.4.160.0100.05019.07
5.4.150.0030.04719.07
5.4.140.0130.07716.56
5.4.130.0030.07016.41
5.4.120.0030.07716.59
5.4.110.0130.06716.59
5.4.100.0130.06016.47
5.4.90.0030.03716.60
5.4.80.0000.03316.45
5.4.70.0030.06716.59
5.4.60.0100.06316.48
5.4.50.0000.06716.34
5.4.40.0070.05716.62
5.4.30.0070.07016.28
5.4.20.0070.03016.41
5.4.10.0070.04316.54
5.4.00.0070.03015.75
5.3.290.0100.03714.80
5.3.280.0000.04014.55
5.3.270.0000.03714.63
5.3.260.0100.05714.56
5.3.250.0000.04014.57
5.3.240.0100.04014.60
5.3.230.0000.03714.82
5.3.220.0000.05014.70
5.3.210.0070.07014.70
5.3.200.0070.07014.43
5.3.190.0000.05714.55
5.3.180.0000.06714.69
5.3.170.0000.03314.71
5.3.160.0070.04014.58
5.3.150.0070.03014.57
5.3.140.0070.02714.59
5.3.130.0030.04014.54
5.3.120.0070.04014.56
5.3.110.0000.06314.54
5.3.100.0030.03714.08
5.3.90.0070.03014.16
5.3.80.0070.03314.08
5.3.70.0000.04014.01
5.3.60.0070.03314.23
5.3.50.0030.03714.01
5.3.40.0030.03713.80
5.3.30.0130.02313.92
5.3.20.0030.03313.75
5.3.10.0070.03013.79
5.3.00.0000.03713.49
5.2.170.0000.03311.86
5.2.160.0030.02711.86
5.2.150.0000.03011.86
5.2.140.0030.02311.86
5.2.130.0030.02711.86
5.2.120.0030.02711.86
5.2.110.0030.02311.86
5.2.100.0070.06011.86
5.2.90.0000.04011.86
5.2.80.0000.03311.86
5.2.70.0030.06011.86
5.2.60.0000.02711.86
5.2.50.0000.03311.86
5.2.40.0070.02711.86
5.2.30.0030.04311.86
5.2.20.0000.05311.86
5.2.10.0070.03711.86
5.2.00.0000.03011.86
5.1.60.0000.02711.86
5.1.50.0000.02711.86
5.1.40.0030.02311.86
5.1.30.0000.02311.86
5.1.20.0000.02711.86
5.1.10.0070.02011.86
5.1.00.0000.02311.86
5.0.50.0030.02011.86
5.0.40.0030.03011.86
5.0.30.0030.03011.86
5.0.20.0000.02011.86
5.0.10.0000.01711.86
5.0.00.0000.03011.86
4.4.90.0070.00711.86
4.4.80.0000.01711.86
4.4.70.0030.01311.86
4.4.60.0000.01311.86
4.4.50.0000.01711.86
4.4.40.0000.02711.86
4.4.30.0000.01711.86
4.4.20.0000.01711.86
4.4.10.0000.01711.86
4.4.00.0030.02311.86
4.3.110.0000.02011.86
4.3.100.0000.01711.86
4.3.90.0000.01311.86
4.3.80.0030.02311.86
4.3.70.0000.01311.86
4.3.60.0030.01011.86
4.3.50.0000.01311.86
4.3.40.0030.02311.86
4.3.30.0000.01311.86
4.3.20.0030.01011.86
4.3.10.0000.01311.86
4.3.00.0000.01311.86

preferences:
55.53 ms | 401 KiB | 5 Q