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(); } 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.70.0090.00618.30
8.3.60.0100.00718.18
8.3.50.0110.00821.98
8.3.40.0110.00418.68
8.3.30.0070.00718.79
8.3.20.0040.00418.95
8.3.10.0080.00021.02
8.3.00.0040.00421.91
8.2.180.0070.01116.34
8.2.170.0070.00722.96
8.2.160.0100.00320.43
8.2.150.0060.00324.18
8.2.140.0080.00024.66
8.2.130.0060.00326.16
8.2.120.0040.00421.00
8.2.110.0050.00520.48
8.2.100.0110.00017.78
8.2.90.0050.00319.09
8.2.80.0050.00317.97
8.2.70.0000.00817.50
8.2.60.0090.00017.91
8.2.50.0030.00618.07
8.2.40.0050.00218.22
8.2.30.0040.00419.35
8.2.20.0070.00017.64
8.2.10.0040.00417.71
8.2.00.0000.00817.56
8.1.280.0140.00325.92
8.1.270.0040.00423.99
8.1.260.0080.00026.35
8.1.250.0050.00228.09
8.1.240.0060.00322.33
8.1.230.0080.00322.63
8.1.220.0030.00518.77
8.1.210.0040.00418.91
8.1.200.0030.00617.23
8.1.190.0050.00217.50
8.1.180.0050.00318.10
8.1.170.0040.00418.57
8.1.160.0070.00018.77
8.1.150.0000.00718.43
8.1.140.0000.00717.38
8.1.130.0040.00417.65
8.1.120.0000.00717.25
8.1.110.0040.00417.34
8.1.100.0050.00317.32
8.1.90.0040.00417.36
8.1.80.0070.00017.32
8.1.70.0030.00317.36
8.1.60.0030.00617.53
8.1.50.0000.00917.40
8.1.40.0000.00817.39
8.1.30.0040.00417.57
8.1.20.0050.00317.58
8.1.10.0050.00317.40
8.1.00.0060.00617.34
8.0.300.0040.00419.90
8.0.290.0050.00317.16
8.0.280.0040.00418.43
8.0.270.0000.00717.23
8.0.260.0000.00616.74
8.0.250.0070.00017.01
8.0.240.0000.00816.98
8.0.230.0000.00716.98
8.0.220.0030.00316.82
8.0.210.0000.00716.89
8.0.200.0000.00616.93
8.0.190.0000.00716.84
8.0.180.0040.00416.90
8.0.170.0040.00416.90
8.0.160.0040.00416.89
8.0.150.0030.00316.80
8.0.140.0030.00616.89
8.0.130.0050.00013.30
8.0.120.0040.00416.86
8.0.110.0040.00416.79
8.0.100.0040.00416.85
8.0.90.0000.00716.71
8.0.80.0030.01216.87
8.0.70.0040.00416.73
8.0.60.0040.00416.75
8.0.50.0070.00016.72
8.0.30.0100.01117.21
8.0.20.0100.01017.40
8.0.10.0040.00416.81
8.0.00.0080.01016.76
7.4.330.0000.00516.70
7.4.320.0030.00316.61
7.4.300.0070.00016.53
7.4.290.0000.00716.41
7.4.280.0000.00716.51
7.4.270.0030.00616.55
7.4.260.0050.00013.23
7.4.250.0000.00816.42
7.4.240.0040.00416.48
7.4.230.0070.00016.50
7.4.220.0070.01616.33
7.4.210.0090.00516.62
7.4.200.0030.00316.25
7.4.190.0040.00416.69
7.4.160.0100.01316.69
7.4.150.0110.00717.40
7.4.140.0100.00817.86
7.4.130.0150.00616.54
7.4.120.0090.00816.57
7.4.110.0110.00616.54
7.4.100.0070.01616.45
7.4.90.0090.01316.62
7.4.80.0100.01019.39
7.4.70.0140.00316.41
7.4.60.0060.01016.70
7.4.50.0030.00616.43
7.4.40.0100.00322.77
7.4.30.0040.01216.49
7.4.00.0000.01514.85
7.3.330.0050.00013.32
7.3.320.0000.00513.38
7.3.310.0070.00016.29
7.3.300.0030.00316.25
7.3.290.0140.00416.33
7.3.280.0080.00816.33
7.3.270.0120.00617.40
7.3.260.0120.01118.24
7.3.250.0070.01116.25
7.3.240.0140.00816.58
7.3.230.0120.00616.55
7.3.210.0130.00316.32
7.3.200.0030.01519.39
7.3.190.0030.01916.61
7.3.180.0060.01016.24
7.3.170.0030.01716.41
7.3.160.0040.01216.31
7.3.120.0070.00714.87
7.3.00.0040.01116.50
7.2.330.0070.01016.76
7.2.320.0060.01116.61
7.2.310.0000.01916.84
7.2.300.0100.00716.43
7.2.290.0070.01116.81
7.2.130.0090.00616.89
7.2.120.0030.01316.79
7.2.110.0040.00716.77
7.2.100.0040.00816.73
7.2.90.0060.00916.75
7.2.80.0050.00816.91
7.2.70.0070.00717.03
7.2.60.0080.00316.89
7.2.50.0030.00617.02
7.2.40.0000.01317.09
7.2.30.0110.00016.90
7.2.20.0070.00716.75
7.2.10.0110.00417.02
7.2.00.0060.00818.08
7.1.250.0030.01015.73
7.1.240.0040.01115.75
7.1.230.0040.00815.83
7.1.220.0070.00615.85
7.1.210.0060.00615.75
7.1.200.0060.00315.84
7.1.190.0070.01015.80
7.1.180.0100.00315.88
7.1.170.0030.01015.78
7.1.160.0070.00715.51
7.1.150.0090.00015.71
7.1.140.0080.00015.52
7.1.130.0080.00415.48
7.1.120.0030.00715.74
7.1.110.0040.00815.72
7.1.100.0060.00716.79
7.1.90.0000.01115.91
7.1.80.0110.00415.71
7.1.70.0040.01016.36
7.1.60.0100.00817.45
7.1.50.0050.01116.25
7.1.40.0080.00615.72
7.1.30.0120.00015.78
7.1.20.0080.00815.66
7.1.10.0030.00615.91
7.1.00.0050.02019.11
7.0.330.0070.00715.15
7.0.320.0050.00515.08
7.0.310.0030.01015.08
7.0.300.0090.00315.30
7.0.290.0030.00615.21
7.0.280.0040.00715.26
7.0.270.0090.00315.29
7.0.260.0090.00415.16
7.0.250.0060.00615.35
7.0.240.0060.00615.00
7.0.230.0060.00615.11
7.0.220.0100.00015.34
7.0.210.0060.00615.52
7.0.200.0120.00815.05
7.0.190.0110.00415.45
7.0.180.0060.00615.24
7.0.170.0090.00015.20
7.0.160.0030.01015.14
7.0.150.0040.01115.44
7.0.140.0020.03918.85
7.0.130.0120.00015.21
7.0.120.0040.00715.32
7.0.110.0030.00515.21
7.0.100.0200.04217.55
7.0.90.0240.04717.71
7.0.80.0230.04117.57
7.0.70.0220.03917.67
7.0.60.0290.04317.62
7.0.50.0230.04317.88
7.0.40.0100.03416.72
7.0.30.0100.02816.74
7.0.20.0120.03716.79
7.0.10.0080.04416.65
7.0.00.0050.04816.65
5.6.380.0060.00913.98
5.6.370.0100.00314.00
5.6.360.0070.00414.52
5.6.350.0060.00614.38
5.6.340.0060.00814.21
5.6.330.0070.00714.23
5.6.320.0060.00314.68
5.6.310.0110.00014.61
5.6.300.0060.00614.41
5.6.290.0070.00714.42
5.6.280.0030.03517.68
5.6.270.0030.01014.04
5.6.260.0060.00614.09
5.6.250.0070.04517.46
5.6.240.0040.04517.26
5.6.230.0040.04917.52
5.6.220.0110.02717.31
5.6.210.0040.04717.40
5.6.200.0050.04717.48
5.6.190.0130.04017.69
5.6.180.0110.04317.73
5.6.170.0120.03817.57
5.6.160.0090.03017.60
5.6.150.0060.04117.65
5.6.140.0070.04217.56
5.6.130.0080.04317.70
5.6.120.0100.03917.61
5.6.110.0080.03717.73
5.6.100.0150.03017.67
5.6.90.0050.03617.58
5.6.80.0030.02817.13
5.6.70.0080.04017.28
5.6.60.0100.03817.36
5.6.50.0050.04217.24
5.6.40.0000.03217.33
5.6.30.0050.03917.36
5.6.20.0110.03117.23
5.6.10.0070.04017.39
5.6.00.0070.04517.16
5.5.380.0020.04215.72
5.5.370.0030.02715.73
5.5.360.0000.03015.86
5.5.350.0080.03815.66
5.5.340.0080.04015.90
5.5.330.0050.04215.97
5.5.320.0020.03315.92
5.5.310.0080.03216.01
5.5.300.0080.04015.96
5.5.290.0070.04316.11
5.5.280.0110.03315.86
5.5.270.0090.03015.99
5.5.260.0100.03815.86
5.5.250.0100.03715.76
5.5.240.0060.02315.55
5.5.230.0050.04315.77
5.5.220.0050.03015.61
5.5.210.0120.03515.70
5.5.200.0080.03815.74
5.5.190.0030.03315.63
5.5.180.0080.03615.70
5.5.170.0000.00610.90
5.5.160.0050.04215.60
5.5.150.0070.03515.59
5.5.140.0050.02615.73
5.5.130.0080.03815.52
5.5.120.0080.03515.72
5.5.110.0060.02615.52
5.5.100.0050.04015.57
5.5.90.0050.04415.60
5.5.80.0040.02415.55
5.5.70.0030.04315.48
5.5.60.0060.04115.47
5.5.50.0050.04115.43
5.5.40.0070.04015.51
5.5.30.0070.03915.62
5.5.20.0020.03915.50
5.5.10.0050.04615.61
5.5.00.0040.04415.60
5.4.450.0050.03915.24
5.4.440.0120.03815.20
5.4.430.0060.02815.35
5.4.420.0100.04015.27
5.4.410.0050.04414.97
5.4.400.0050.04315.06
5.4.390.0050.04415.09
5.4.380.0070.03815.04
5.4.370.0110.03814.96
5.4.360.0070.04214.97
5.4.350.0050.03615.09
5.4.340.0070.04214.93
5.4.330.0080.00010.98
5.4.320.0100.03014.94
5.4.310.0100.03714.99
5.4.300.0090.03515.10
5.4.290.0080.02214.96
5.4.280.0120.03914.97
5.4.270.0020.04415.05
5.4.260.0090.03915.25
5.4.250.0050.02715.07
5.4.240.0100.03515.02
5.4.230.0140.03315.01
5.4.220.0070.03815.03
5.4.210.0070.03715.05
5.4.200.0080.03615.01
5.4.190.0030.04215.06
5.4.180.0060.04115.03
5.4.170.0100.03815.10
5.4.160.0090.03815.04
5.4.150.0020.04215.04
5.4.140.0110.02813.76
5.4.130.0070.03913.64
5.4.120.0080.03813.61
5.4.110.0050.03613.73
5.4.100.0080.02313.74
5.4.90.0000.02613.66
5.4.80.0040.03713.71
5.4.70.0100.03313.63
5.4.60.0030.03713.83
5.4.50.0030.04213.68
5.4.40.0040.03913.63
5.4.30.0080.03113.61
5.4.20.0070.03513.66
5.4.10.0100.03013.63
5.4.00.0080.03713.31
5.3.290.0050.03712.77
5.3.280.0050.04012.76
5.3.270.0020.03212.74
5.3.260.0050.02812.79
5.3.250.0050.04012.72
5.3.240.0050.04212.74
5.3.230.0080.03712.76
5.3.220.0080.03612.79
5.3.210.0070.03412.71
5.3.200.0030.02512.79
5.3.190.0020.02612.75
5.3.180.0050.02912.80
5.3.170.0090.03612.70
5.3.160.0030.04012.80
5.3.150.0080.03812.72
5.3.140.0100.03012.79
5.3.130.0050.04212.76
5.3.120.0040.04112.69
5.3.110.0070.03612.77
5.3.100.0110.03412.46
5.3.90.0070.03612.52
5.3.80.0040.03912.49
5.3.70.0050.03612.52
5.3.60.0120.03312.44
5.3.50.0070.03712.48
5.3.40.0020.04312.38
5.3.30.0030.04312.35
5.3.20.0030.04012.29
5.3.10.0050.03712.31
5.3.00.0050.03912.24
5.2.170.0030.03511.54
5.2.160.0020.02411.54
5.2.150.0020.03611.54
5.2.140.0000.03911.54
5.2.130.0050.03411.54
5.2.120.0040.02011.54
5.2.110.0030.03311.54
5.2.100.0050.03111.54
5.2.90.0010.03011.54
5.2.80.0110.01511.54
5.2.70.0030.04111.54
5.2.60.0030.03411.54
5.2.50.0070.02811.54
5.2.40.0030.03111.54
5.2.30.0030.03411.54
5.2.20.0100.03111.54
5.2.10.0060.02611.54
5.2.00.0080.03011.54
5.1.60.0050.02811.54
5.1.50.0060.02811.54
5.1.40.0090.02611.54
5.1.30.0030.03111.54
5.1.20.0030.03111.54
5.1.10.0050.03011.54
5.1.00.0040.02511.54
5.0.50.0050.01311.54
5.0.40.0000.02611.54
5.0.30.0090.02811.54
5.0.20.0040.01511.54
5.0.10.0030.02011.54
5.0.00.0050.03211.54
4.4.90.0020.02011.54
4.4.80.0070.01011.54
4.4.70.0000.01911.54
4.4.60.0030.02011.54
4.4.50.0040.01011.54
4.4.40.0050.02411.54
4.4.30.0020.01511.54
4.4.20.0070.01511.54
4.4.10.0020.01911.54
4.4.00.0020.03011.54
4.3.110.0030.01811.54
4.3.100.0050.01511.54
4.3.90.0020.01811.54
4.3.80.0030.02511.54
4.3.70.0040.01211.54
4.3.60.0030.01711.54
4.3.50.0020.01411.54
4.3.40.0020.02011.54
4.3.30.0010.02011.54
4.3.20.0030.01811.54
4.3.10.0000.01311.54
4.3.00.0030.00711.54

preferences:
32.6 ms | 401 KiB | 5 Q