3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function someMethod() { return "Foo::someMethod ".get_class($this); } } class Bar { public function someMethod() { return "Bar::someMethod ".get_class($this); } } $foo = new Foo(); $bar = new Bar(); $reflClass = new ReflectionClass('Foo'); $reflMethod = $reflClass->getMethod('someMethod'); $fooClosure = $reflMethod->getClosure($foo); $barClosure = $fooClosure->bindTo($bar); echo $fooClosure()."\n"; echo $barClosure()."\n";

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.0000.01616.88
8.3.50.0100.00821.02
8.3.40.0140.00718.97
8.3.30.0090.00618.80
8.3.20.0020.00520.16
8.3.10.0040.00421.88
8.3.00.0000.00819.44
8.2.180.0090.00917.00
8.2.170.0110.00322.96
8.2.160.0040.01120.37
8.2.150.0030.00624.18
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0100.00017.50
8.2.110.0060.00320.39
8.2.100.0100.00319.36
8.2.90.0040.00419.22
8.2.80.0000.00917.97
8.2.70.0050.00317.63
8.2.60.0040.00717.93
8.2.50.0050.00318.07
8.2.40.0040.00419.45
8.2.30.0000.00820.69
8.2.20.0020.00517.66
8.2.10.0050.00217.94
8.2.00.0000.00718.07
8.1.280.0040.01125.92
8.1.270.0100.01022.15
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0060.00323.88
8.1.230.0040.00717.70
8.1.220.0040.00417.74
8.1.210.0030.00518.77
8.1.200.0000.01017.35
8.1.190.0050.00317.22
8.1.180.0080.00018.10
8.1.170.0040.00418.61
8.1.160.0050.00222.00
8.1.150.0000.00818.81
8.1.140.0050.00317.46
8.1.130.0000.00717.64
8.1.120.0000.00817.48
8.1.110.0040.00417.52
8.1.100.0000.00817.43
8.1.90.0050.00317.35
8.1.80.0000.00817.40
8.1.70.0030.00317.36
8.1.60.0000.00817.44
8.1.50.0000.00817.57
8.1.40.0090.00017.54
8.1.30.0040.00417.57
8.1.20.0000.00717.52
8.1.10.0040.00417.60
8.1.00.0050.00317.51
8.0.300.0040.00418.77
8.0.290.0030.00616.75
8.0.280.0030.00318.43
8.0.270.0000.00717.16
8.0.260.0030.00517.24
8.0.250.0040.00417.03
8.0.240.0030.00316.89
8.0.230.0000.00717.01
8.0.220.0040.00416.94
8.0.210.0000.00716.86
8.0.200.0030.00316.94
8.0.190.0000.00817.00
8.0.180.0000.00816.95
8.0.170.0040.00416.85
8.0.160.0030.00416.96
8.0.150.0000.00816.87
8.0.140.0040.00416.92
8.0.130.0030.00313.31
8.0.120.0000.00717.01
8.0.110.0050.00216.98
8.0.100.0040.00416.82
8.0.90.0040.00416.94
8.0.80.0090.00617.00
8.0.70.0000.00716.99
8.0.60.0000.00916.84
8.0.50.0040.00416.95
8.0.30.0060.01317.24
8.0.20.0120.01017.40
8.0.10.0030.00616.86
8.0.00.0080.01216.70
7.4.330.0030.00315.08
7.4.320.0030.00316.54
7.4.300.0000.00716.49
7.4.290.0070.00016.49
7.4.280.0070.00016.40
7.4.270.0040.00416.49
7.4.260.0030.00316.59
7.4.250.0040.00416.41
7.4.240.0020.00516.54
7.4.230.0000.00716.61
7.4.220.0040.01416.52
7.4.210.0070.00716.55
7.4.200.0000.00816.50
7.4.160.0070.01016.53
7.4.150.0070.01117.40
7.4.140.0080.01017.86
7.4.130.0100.00716.45
7.4.120.0110.00716.61
7.4.110.0100.01316.41
7.4.100.0140.00416.63
7.4.90.0100.01016.34
7.4.80.0070.01019.39
7.4.70.0140.00416.58
7.4.60.0100.00616.61
7.4.50.0080.00016.22
7.4.40.0000.01616.46
7.4.30.0120.00916.59
7.4.00.0070.00715.14
7.3.330.0060.00013.18
7.3.320.0050.00013.17
7.3.310.0080.00016.20
7.3.300.0030.00316.35
7.3.290.0090.00716.34
7.3.280.0100.00916.33
7.3.270.0120.00617.40
7.3.260.0060.01116.32
7.3.250.0110.01116.41
7.3.240.0110.00616.27
7.3.230.0120.00616.39
7.3.210.0080.00816.53
7.3.200.0060.01216.44
7.3.190.0100.00616.38
7.3.180.0040.01216.22
7.3.170.0030.01316.30
7.3.160.0140.00616.30
7.2.330.0110.01516.65
7.2.320.0030.01516.86
7.2.310.0140.00316.79
7.2.300.0070.01016.73
7.2.290.0160.00816.50
7.2.60.0100.00316.99
7.2.00.0030.00919.67
7.1.200.0060.00615.44
7.1.100.0040.00818.05
7.1.70.0000.00716.85
7.1.60.0030.01619.27
7.1.50.0130.00716.93
7.1.00.0070.07322.33
7.0.200.0000.00716.46
7.0.100.0130.07320.05
7.0.90.0230.07320.04
7.0.80.0100.04720.13
7.0.70.0130.07020.15
7.0.60.0130.07719.88
7.0.50.0170.07720.36
7.0.40.0030.05020.05
7.0.30.0130.07720.10
7.0.20.0130.08320.00
7.0.10.0030.08320.17
7.0.00.0100.08020.02
5.6.280.0030.03720.81
5.6.250.0070.04720.70
5.6.240.0030.06320.62
5.6.230.0030.08720.57
5.6.220.0030.08320.67
5.6.210.0070.08020.61
5.6.200.0030.07720.97
5.6.190.0100.08321.14
5.6.180.0170.06721.06
5.6.170.0030.05321.18
5.6.160.0100.08321.03
5.6.150.0070.08321.01
5.6.140.0070.08321.14
5.6.130.0200.07721.18
5.6.120.0130.07721.05
5.6.110.0170.07021.05
5.6.100.0030.08720.90
5.6.90.0070.09020.93
5.6.80.0100.06720.45
5.6.70.0130.07320.48
5.6.60.0070.04320.33
5.6.50.0030.07320.57
5.6.40.0000.05720.36
5.6.30.0070.08020.39
5.6.20.0130.07320.45
5.6.10.0030.07720.52
5.6.00.0100.08020.42
5.5.380.0100.07720.45
5.5.370.0130.07720.38
5.5.360.0130.07720.39
5.5.350.0100.04720.44
5.5.340.0130.07720.90
5.5.330.0230.06320.81
5.5.320.0100.05320.79
5.5.310.0170.07720.80
5.5.300.0100.08320.87
5.5.290.0070.05720.79
5.5.280.0100.08320.87
5.5.270.0030.08720.76
5.5.260.0130.05020.89
5.5.250.0270.06720.68
5.5.240.0030.08020.26
5.5.230.0030.05720.14
5.5.220.0130.07320.10
5.5.210.0000.08720.26
5.5.200.0070.07020.25
5.5.190.0070.07320.29
5.5.180.0070.07720.16
5.5.160.0070.07320.28
5.5.150.0170.06720.23
5.5.140.0170.07020.00
5.5.130.0130.07020.27
5.5.120.0170.06320.14
5.5.110.0100.07020.15
5.5.100.0130.04020.17
5.5.90.0130.07019.99
5.5.80.0130.06020.07
5.5.70.0100.08020.05
5.5.60.0070.07720.05
5.5.50.0230.06320.11
5.5.40.0170.07020.04
5.5.30.0000.05020.12
5.5.20.0030.08720.16
5.5.10.0100.07720.05
5.5.00.0100.07319.97
5.4.450.0000.08319.21
5.4.440.0230.06019.22
5.4.430.0130.07019.17
5.4.420.0130.07319.46
5.4.410.0130.07019.32
5.4.400.0170.05319.23
5.4.390.0130.07019.13
5.4.380.0030.08318.95
5.4.370.0130.06719.13
5.4.360.0070.07019.13
5.4.350.0030.08019.13
5.4.340.0070.08019.10
5.4.320.0130.07019.13
5.4.310.0100.07719.04
5.4.300.0100.07018.95
5.4.290.0130.06718.86
5.4.280.0070.07719.04
5.4.270.0100.07019.04
5.4.260.0100.07019.09
5.4.250.0170.06319.04
5.4.240.0100.06319.13
5.4.230.0170.06019.15
5.4.220.0170.06718.85
5.4.210.0000.08318.84
5.4.200.0130.07019.03
5.4.190.0100.07319.03
5.4.180.0070.07318.84
5.4.170.0030.08019.03
5.4.160.0000.05019.01
5.4.150.0070.06719.07
5.4.140.0100.03716.34
5.4.130.0170.06016.38
5.4.120.0070.07016.23
5.4.110.0130.06016.45
5.4.100.0030.07016.52
5.4.90.0170.06716.49
5.4.80.0100.06716.47
5.4.70.0170.06016.29
5.4.60.0030.08016.41
5.4.50.0070.04716.44
5.4.40.0200.06016.45
5.4.30.0030.07316.45
5.4.20.0070.07016.29
5.4.10.0130.06716.29
5.4.00.0070.07015.75

preferences:
40.57 ms | 401 KiB | 5 Q