3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { static function bar() { $foo = function() { return get_called_class(); }; $foo->bindTo(null,'Bar'); print get_called_class(); return $foo(); } } class Bar extends Foo { } print Foo::bar(); print 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.0150.00018.43
8.3.60.0040.01116.48
8.3.50.0110.00821.93
8.3.40.0120.00618.67
8.3.30.0140.00019.08
8.3.20.0040.00420.13
8.3.10.0040.00423.46
8.3.00.0030.00717.25
8.2.180.0140.00718.54
8.2.170.0100.00322.96
8.2.160.0100.00320.57
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0070.01126.16
8.2.120.0070.00019.25
8.2.110.0070.00322.30
8.2.100.0040.00817.72
8.2.90.0060.00319.09
8.2.80.0000.00817.97
8.2.70.0080.00017.63
8.2.60.0040.00417.88
8.2.50.0040.00418.07
8.2.40.0050.00318.14
8.2.30.0000.00718.02
8.2.20.0040.00417.67
8.2.10.0040.00418.11
8.2.00.0030.00717.67
8.1.280.0130.00325.92
8.1.270.0080.00022.13
8.1.260.0090.00626.35
8.1.250.0000.00828.09
8.1.240.0030.00523.92
8.1.230.0120.00019.09
8.1.220.0060.00317.74
8.1.210.0000.00818.77
8.1.200.0030.00617.23
8.1.190.0030.00617.63
8.1.180.0080.00018.10
8.1.170.0030.00718.70
8.1.160.0040.00421.98
8.1.150.0000.00818.68
8.1.140.0000.00717.37
8.1.130.0000.00717.83
8.1.120.0040.00417.30
8.1.110.0030.00317.49
8.1.100.0000.00717.35
8.1.90.0030.00317.36
8.1.80.0000.00717.46
8.1.70.0000.00717.29
8.1.60.0070.00417.60
8.1.50.0040.00417.41
8.1.40.0040.00417.53
8.1.30.0000.00817.55
8.1.20.0040.00417.64
8.1.10.0000.00717.61
8.1.00.0070.00017.46
8.0.300.0000.00719.15
8.0.290.0040.00417.18
8.0.280.0070.00018.37
8.0.270.0040.00417.37
8.0.260.0030.00317.17
8.0.250.0000.00617.00
8.0.240.0000.01116.87
8.0.230.0030.00316.90
8.0.220.0070.00016.70
8.0.210.0000.00716.85
8.0.200.0070.00417.01
8.0.190.0000.00716.95
8.0.180.0040.00416.90
8.0.170.0040.00416.92
8.0.160.0030.00317.01
8.0.150.0000.00816.84
8.0.140.0070.00016.86
8.0.130.0070.00013.29
8.0.120.0040.00416.84
8.0.110.0040.00416.84
8.0.100.0050.00216.82
8.0.90.0040.00416.85
8.0.80.0090.00916.90
8.0.70.0040.00416.69
8.0.60.0000.00816.79
8.0.50.0040.00416.89
8.0.30.0060.01217.16
8.0.20.0100.00917.42
8.0.10.0040.00416.95
8.0.00.0120.00716.76
7.4.330.0030.00315.00
7.4.320.0000.00616.42
7.4.300.0030.00316.53
7.4.290.0000.00716.59
7.4.280.0030.00316.41
7.4.270.0040.00416.60
7.4.260.0000.00816.53
7.4.250.0000.00716.55
7.4.240.0000.00716.44
7.4.230.0030.00316.58
7.4.220.0040.01516.52
7.4.210.0080.01016.51
7.4.200.0070.00016.63
7.4.190.0060.00316.64
7.4.160.0120.00316.38
7.4.150.0170.00317.40
7.4.140.0090.00917.86
7.4.130.0110.00616.72
7.4.120.0160.00716.47
7.4.110.0170.00316.45
7.4.100.0130.00716.43
7.4.90.0030.01316.48
7.4.80.0000.01719.39
7.4.70.0140.00416.59
7.4.60.0090.01216.60
7.4.50.0000.00816.50
7.4.40.0070.01022.77
7.4.30.0030.01316.36
7.4.00.0120.00014.71
7.3.330.0030.00313.32
7.3.320.0000.00513.23
7.3.310.0030.00516.19
7.3.300.0030.00316.35
7.3.290.0030.01316.21
7.3.280.0110.00816.25
7.3.270.0120.00617.40
7.3.260.0060.01016.29
7.3.250.0170.00616.35
7.3.240.0090.00616.24
7.3.230.0080.00816.39
7.3.210.0100.01316.55
7.3.200.0120.00619.39
7.3.190.0090.00916.36
7.3.180.0130.00316.61
7.3.170.0040.01116.54
7.3.160.0120.00416.53
7.3.120.0060.00914.74
7.2.330.0200.00216.60
7.2.320.0090.00916.70
7.2.310.0130.00316.36
7.2.300.0100.01116.81
7.2.290.0060.00916.38
7.1.70.0040.00716.94
7.1.60.0060.01819.33
7.1.50.0080.00516.81
7.1.00.0000.08022.45
7.0.200.0160.00314.57
7.0.140.0130.06321.97
7.0.60.0030.07320.01
7.0.50.0070.07317.88
7.0.40.0070.04020.05
7.0.30.0530.03320.15
7.0.20.0300.07720.26
7.0.10.0100.06020.12
7.0.00.0070.03720.30
5.6.280.0100.06720.79
5.6.210.0130.08020.48
5.6.200.0100.07718.19
5.6.190.0100.09020.48
5.6.180.0270.06020.63
5.6.170.0270.06020.52
5.6.160.0030.07320.55
5.6.150.0030.04018.15
5.6.140.0030.08318.18
5.6.130.0030.09018.28
5.6.120.0130.08021.12
5.6.110.0070.05721.01
5.6.100.0030.04321.14
5.6.90.0170.07321.14
5.6.80.0130.05720.39
5.6.70.3930.04020.29
5.5.350.0130.08020.54
5.5.340.0070.07318.07
5.5.330.0030.09020.26
5.5.320.0400.07720.40
5.5.310.0200.04720.38
5.5.300.0100.04318.08
5.5.290.0030.04017.95
5.5.280.0070.07020.89
5.5.270.0030.04020.84
5.5.260.0070.08020.96
5.5.250.0070.07320.55
5.5.240.0130.07320.29
5.4.450.0230.05019.17
5.4.440.0100.06019.48
5.4.430.0170.05319.38
5.4.420.0300.04319.47
5.4.410.0170.06019.48
5.4.400.0230.05019.13
5.4.390.0100.06019.38
5.4.380.0300.07318.62
5.4.370.0270.05318.84
5.4.360.0230.05018.80
5.4.350.0200.06018.53
5.4.340.0230.07718.63
5.4.320.0110.03712.51
5.4.310.0070.03712.50
5.4.300.0040.03912.51
5.4.290.0050.03912.50
5.4.280.0090.04912.37
5.4.270.0140.06212.38
5.4.260.0090.05612.38
5.4.250.0110.05612.37
5.4.240.0110.04812.38
5.4.230.0070.05712.36
5.4.220.0090.04612.37
5.4.210.0120.04412.36
5.4.200.0060.04812.36
5.4.190.0190.07512.36
5.4.180.0110.04312.36
5.4.170.0170.07812.37
5.4.160.0120.05712.37
5.4.150.0150.04712.36
5.4.140.0210.07012.05
5.4.130.0120.04912.04
5.4.120.0180.07412.00
5.4.110.0150.05311.99
5.4.100.0170.10311.99
5.4.90.0110.05211.99
5.4.80.0220.07411.99
5.4.70.0450.09611.99
5.4.60.0110.05211.99
5.4.50.0230.06911.98
5.4.40.0190.07511.98
5.4.30.0110.09211.97
5.4.20.0200.06211.97
5.4.10.0130.06711.97
5.4.00.0160.06411.46
5.3.290.0070.04012.80
5.3.280.0220.06712.71
5.3.270.0100.05412.72
5.3.260.0170.07812.72
5.3.250.0100.05612.72
5.3.240.0120.05112.72
5.3.230.0050.05112.71
5.3.220.0180.07012.68
5.3.210.0130.07212.68
5.3.200.0100.04812.68
5.3.190.0100.04712.68
5.3.180.0070.05112.68
5.3.170.0120.07312.67
5.3.160.0060.06212.67
5.3.150.0120.05112.67
5.3.140.0100.06012.66
5.3.130.0180.09212.66
5.3.120.0140.07412.66
5.3.110.0190.07012.66
5.3.100.0140.06012.12
5.3.90.0170.04712.09
5.3.80.0100.06012.07
5.3.70.0100.04612.07
5.3.60.0130.04712.06
5.3.50.0160.06412.01
5.3.40.0140.05312.00
5.3.30.0080.04511.96
5.3.20.0100.05611.75
5.3.10.0120.04911.70
5.3.00.0170.04611.70
5.2.170.0070.0419.18
5.2.160.0100.0419.18
5.2.150.0100.0509.18
5.2.140.0090.0369.18
5.2.130.0090.0459.14
5.2.120.0070.0469.14
5.2.110.0100.0509.15
5.2.100.0090.0299.14
5.2.90.0050.0309.14
5.2.80.0080.0329.14
5.2.70.0050.0409.14
5.2.60.0100.0399.09
5.2.50.0140.0389.07
5.2.40.0100.0429.04
5.2.30.0250.0769.02
5.2.20.0080.0379.00
5.2.10.0080.0398.92
5.2.00.0090.0378.78
5.1.60.0110.0558.07
5.1.50.0070.0258.07
5.1.40.0110.0368.04
5.1.30.0060.0358.39
5.1.20.0130.0328.41
5.1.10.0100.0478.15
5.1.00.0100.0348.14
5.0.50.0050.0306.62
5.0.40.0100.0336.47
5.0.30.0060.0436.29
5.0.20.0050.0286.25
5.0.10.0090.0296.23
5.0.00.0050.0396.22
4.4.90.0040.0284.78
4.4.80.0050.0204.75
4.4.70.0070.0254.75
4.4.60.0070.0294.75
4.4.50.0070.0214.77
4.4.40.0030.0374.71
4.4.30.0140.0354.75
4.4.20.0060.0324.84
4.4.10.0090.0214.85
4.4.00.0040.0364.76
4.3.110.0070.0354.67
4.3.100.0050.0264.66
4.3.90.0080.0284.63
4.3.80.0110.0434.58
4.3.70.0030.0234.63
4.3.60.0080.0294.62
4.3.50.0070.0204.63
4.3.40.0070.0284.54
4.3.30.0040.0183.29
4.3.20.0070.0143.27
4.3.10.0030.0183.23
4.3.00.0030.0206.73

preferences:
57.84 ms | 401 KiB | 5 Q