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 Foo; return $foo->bindTo(null,'Foo'); } } class Bar extends Foo { } //print Bar::bar() . Bar::baz() . print Bar::rebind()(); // 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.0180.00418.68
8.3.50.0250.00421.86
8.3.40.0070.00718.83
8.3.30.0140.00319.02
8.3.20.0040.00420.23
8.3.10.0070.01123.65
8.3.00.0040.00420.46
8.2.180.0140.00318.21
8.2.170.0090.00922.96
8.2.160.0100.01022.26
8.2.150.0000.00824.18
8.2.140.0080.00024.66
8.2.130.0050.00326.16
8.2.120.0000.00820.44
8.2.110.0050.00522.11
8.2.100.0090.00317.91
8.2.90.0060.00317.75
8.2.80.0000.00817.97
8.2.70.0000.00917.93
8.2.60.0040.00417.80
8.2.50.0040.00418.10
8.2.40.0060.00320.23
8.2.30.0040.00417.88
8.2.20.0040.00417.65
8.2.10.0040.00417.67
8.2.00.0040.00417.67
8.1.280.0110.00425.92
8.1.270.0050.00222.14
8.1.260.0070.00026.35
8.1.250.0070.00028.09
8.1.240.0090.00020.64
8.1.230.0040.00819.21
8.1.220.0040.00417.74
8.1.210.0030.00518.77
8.1.200.0000.00817.35
8.1.190.0030.00616.98
8.1.180.0000.00818.10
8.1.170.0040.00418.50
8.1.160.0000.00721.95
8.1.150.0000.00718.52
8.1.140.0050.00317.32
8.1.130.0030.00317.68
8.1.120.0030.00417.27
8.1.110.0070.00017.39
8.1.100.0030.00317.23
8.1.90.0000.00717.30
8.1.80.0030.00317.38
8.1.70.0000.00717.24
8.1.60.0040.00417.34
8.1.50.0040.00417.50
8.1.40.0040.00417.29
8.1.30.0000.00817.46
8.1.20.0040.00417.66
8.1.10.0030.00517.50
8.1.00.0000.00717.33
8.0.300.0040.00419.64
8.0.290.0000.00816.75
8.0.280.0000.00718.43
8.0.270.0030.00317.26
8.0.260.0000.00716.83
8.0.250.0000.00716.98
8.0.240.0030.00316.94
8.0.230.0000.00816.83
8.0.220.0060.00016.90
8.0.210.0000.00716.86
8.0.200.0000.00617.02
8.0.190.0030.00516.98
8.0.180.0040.00716.91
8.0.170.0040.00416.95
8.0.160.0000.00716.82
8.0.150.0040.00416.81
8.0.140.0000.00916.83
8.0.130.0000.00613.41
8.0.120.0040.00416.81
8.0.110.0000.00816.96
8.0.100.0000.00716.93
8.0.90.0000.00816.70
8.0.80.0030.01216.89
8.0.70.0040.00416.90
8.0.60.0070.00016.93
8.0.50.0070.00016.96
8.0.30.0140.00517.06
8.0.20.0080.01117.40
8.0.10.0000.00816.87
8.0.00.0130.00816.86
7.4.330.0050.00015.13
7.4.320.0030.00316.41
7.4.300.0000.00616.58
7.4.290.0070.00016.49
7.4.280.0040.00816.56
7.4.270.0000.00716.62
7.4.260.0030.00316.54
7.4.250.0040.00416.50
7.4.240.0000.00716.60
7.4.230.0030.00316.36
7.4.220.0160.00716.55
7.4.210.0100.01116.65
7.4.200.0000.00716.58
7.4.190.0040.00416.38
7.4.160.0090.00616.54
7.4.150.0090.00917.40
7.4.140.0100.01017.86
7.4.130.0150.00516.52
7.4.120.0110.00616.63
7.4.110.0070.01016.36
7.4.100.0130.01016.55
7.4.90.0060.01416.50
7.4.80.0090.00916.45
7.4.70.0070.01416.45
7.4.60.0090.00616.58
7.4.50.0060.00316.58
7.4.40.0040.00822.77
7.4.30.0030.01316.47
7.4.00.0100.00614.96
7.3.330.0000.00513.30
7.3.320.0020.00213.44
7.3.310.0070.00016.38
7.3.300.0000.00716.34
7.3.290.0100.01016.34
7.3.280.0080.00916.33
7.3.270.0090.00917.40
7.3.260.0190.00416.45
7.3.250.0150.00216.45
7.3.240.0120.00616.55
7.3.230.0110.00616.39
7.3.210.0160.00616.52
7.3.200.0100.01419.39
7.3.190.0030.01316.35
7.3.180.0040.01216.35
7.3.170.0130.00316.49
7.3.160.0090.00616.61
7.3.120.0000.01214.93
7.2.330.0140.00316.79
7.2.320.0100.01316.76
7.2.310.0120.00616.79
7.2.300.0120.00616.34
7.2.290.0040.01216.91
7.2.60.0030.01216.66
7.2.00.0030.00919.26
7.1.200.0040.00715.42
7.1.100.0030.00718.19
7.1.70.0000.00816.75
7.1.60.0100.01419.27
7.1.50.0100.01016.86
7.1.00.0100.07022.53
7.0.200.0080.00316.61
7.0.140.0000.07722.18
7.0.60.0070.04019.87
7.0.50.0070.03717.88
7.0.40.0070.08320.24
7.0.30.0370.03720.11
7.0.20.0200.03720.21
7.0.10.0100.07720.26
7.0.00.0200.04320.09
5.6.280.0030.07321.14
5.6.210.0030.08320.54
5.6.200.0130.07318.22
5.6.190.0130.06320.50
5.6.180.0200.04320.48
5.6.170.0230.06720.53
5.6.160.0030.05020.57
5.6.150.0070.07018.21
5.6.140.0030.06718.23
5.6.130.0100.08318.20
5.6.120.0070.05320.99
5.6.110.0070.05720.98
5.6.100.0070.05721.09
5.6.90.0100.07721.12
5.6.80.0070.06320.40
5.5.350.0030.06720.46
5.5.340.0030.08317.96
5.5.330.0070.08020.21
5.5.320.0070.08320.30
5.5.310.0200.03720.24
5.5.300.0100.08317.99
5.5.290.0100.08018.06
5.5.280.0100.08020.91
5.5.270.0030.08720.75
5.5.260.0170.07720.98
5.5.250.0030.04020.63
5.5.240.0170.06020.17
5.4.450.0500.05319.61
5.4.440.0630.06719.45
5.4.430.0670.05319.16
5.4.420.0630.05319.30
5.4.410.0670.05319.35
5.4.400.0870.04719.25
5.4.390.0730.06019.25
5.4.380.0130.05318.58
5.4.370.0070.08018.75
5.4.360.0200.05318.58
5.4.350.0300.06018.79
5.4.340.0170.05018.79
5.4.320.0050.03712.54
5.4.310.0110.04712.53
5.4.300.0090.03912.53
5.4.290.0120.04412.53
5.4.280.0040.04012.40
5.4.270.0030.04012.39
5.4.260.0050.04012.39
5.4.250.0060.04112.40
5.4.240.0080.03512.39
5.4.230.0080.03912.39
5.4.220.0080.03512.39
5.4.210.0100.05212.39
5.4.200.0090.04612.39
5.4.190.0060.04112.39
5.4.180.0100.03612.39
5.4.170.0070.03912.39
5.4.160.0080.03612.38
5.4.150.0120.03212.38
5.4.140.0090.03612.07
5.4.130.0100.03412.05
5.4.120.0070.03412.02
5.4.110.0070.03612.01
5.4.100.0120.03112.02
5.4.90.0060.05112.02
5.4.80.0080.03712.02
5.4.70.0080.03412.01
5.4.60.0080.03412.01
5.4.50.0040.03812.01
5.4.40.0060.03612.00
5.4.30.0050.04312.00
5.4.20.0070.03511.99
5.4.10.0100.04012.00
5.4.00.0030.04011.48
5.3.290.0030.04112.80
5.3.280.0070.03912.71
5.3.270.0080.03812.72
5.3.260.0090.03712.71
5.3.250.0050.03912.72
5.3.240.0070.03712.72
5.3.230.0070.03812.71
5.3.220.0070.03812.68
5.3.210.0080.05312.68
5.3.200.0090.04912.68
5.3.190.0070.04312.68
5.3.180.0080.03712.67
5.3.170.0060.04012.67
5.3.160.0100.03712.68
5.3.150.0080.04112.67
5.3.140.0130.03712.66
5.3.130.0100.03912.66
5.3.120.0100.04112.66
5.3.110.0060.04112.66
5.3.100.0090.03512.12
5.3.90.0130.03112.08
5.3.80.0090.04612.07
5.3.70.0070.05212.07
5.3.60.0070.03812.07
5.3.50.0050.03812.00
5.3.40.0040.03912.00
5.3.30.0080.03211.95
5.3.20.0030.03711.73
5.3.10.0080.03211.70
5.3.00.0040.03811.69
5.2.170.0020.0339.18
5.2.160.0090.0269.18
5.2.150.0070.0309.18
5.2.140.0060.0329.18
5.2.130.0040.0299.14
5.2.120.0040.0339.14
5.2.110.0060.0289.15
5.2.100.0060.0289.14
5.2.90.0050.0299.14
5.2.80.0040.0419.14
5.2.70.0100.0429.14
5.2.60.0060.0439.10
5.2.50.0060.0319.07
5.2.40.0040.0329.04
5.2.30.0050.0309.02
5.2.20.0050.0289.01
5.2.10.0040.0278.91
5.2.00.0030.0298.78
5.1.60.0060.0228.07
5.1.50.0060.0348.07
5.1.40.0070.0358.04
5.1.30.0040.0418.39
5.1.20.0040.0418.42
5.1.10.0050.0378.14
5.1.00.0040.0358.14
5.0.50.0050.0226.61
5.0.40.0030.0206.48
5.0.30.0010.0336.28
5.0.20.0020.0206.26
5.0.10.0010.0226.24
5.0.00.0040.0306.23
4.4.90.0030.0154.78
4.4.80.0040.0144.76
4.4.70.0020.0164.75
4.4.60.0050.0134.75
4.4.50.0050.0134.77
4.4.40.0010.0274.71
4.4.30.0060.0194.76
4.4.20.0020.0254.84
4.4.10.0030.0244.85
4.4.00.0040.0334.76
4.3.110.0030.0184.67
4.3.100.0030.0164.67
4.3.90.0040.0154.63
4.3.80.0020.0264.59
4.3.70.0030.0154.63
4.3.60.0030.0144.63
4.3.50.0030.0154.63
4.3.40.0010.0254.54
4.3.30.0010.0173.28
4.3.20.0040.0143.26
4.3.10.0030.0153.23
4.3.00.0000.0236.94

preferences:
52.26 ms | 401 KiB | 5 Q