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.0110.00716.63
8.3.50.0140.00316.28
8.3.40.0070.00718.89
8.3.30.0140.00718.89
8.3.20.0070.00020.21
8.3.10.0040.00421.85
8.3.00.0050.00319.43
8.2.180.0160.00016.47
8.2.170.0120.00322.96
8.2.160.0130.00320.38
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0030.00526.16
8.2.120.0100.00017.75
8.2.110.0030.00722.05
8.2.100.0080.00417.63
8.2.90.0000.00819.10
8.2.80.0050.00317.97
8.2.70.0030.00617.75
8.2.60.0030.00717.80
8.2.50.0050.00318.07
8.2.40.0050.00519.20
8.2.30.0090.00019.76
8.2.20.0000.00817.74
8.2.10.0050.00318.18
8.2.00.0000.00818.17
8.1.280.0030.01325.92
8.1.270.0060.01322.02
8.1.260.0050.00326.35
8.1.250.0050.00328.09
8.1.240.0060.00322.48
8.1.230.0000.01117.48
8.1.220.0000.00817.74
8.1.210.0040.00418.77
8.1.200.0090.00017.47
8.1.190.0050.00317.35
8.1.180.0000.00718.10
8.1.170.0000.00818.59
8.1.160.0070.00021.93
8.1.150.0000.00718.90
8.1.140.0050.00317.45
8.1.130.0030.00617.68
8.1.120.0030.00517.37
8.1.110.0000.00717.49
8.1.100.0030.00517.36
8.1.90.0050.00217.46
8.1.80.0000.00717.49
8.1.70.0030.00317.44
8.1.60.0030.00617.56
8.1.50.0000.00917.49
8.1.40.0000.00817.52
8.1.30.0050.00617.66
8.1.20.0050.00217.59
8.1.10.0000.00717.55
8.1.00.0000.00817.49
8.0.300.0000.00718.77
8.0.290.0050.00216.88
8.0.280.0080.00018.43
8.0.270.0000.00817.17
8.0.260.0000.00617.25
8.0.250.0040.00416.90
8.0.240.0030.00317.02
8.0.230.0030.00617.08
8.0.220.0030.00317.00
8.0.210.0030.00316.96
8.0.200.0030.00316.95
8.0.190.0080.00017.04
8.0.180.0030.00516.89
8.0.170.0000.00716.91
8.0.160.0070.00017.02
8.0.150.0050.00316.80
8.0.140.0030.00516.96
8.0.130.0000.00613.33
8.0.120.0000.00816.94
8.0.110.0000.00816.93
8.0.100.0040.00416.95
8.0.90.0000.00716.82
8.0.80.0090.00616.91
8.0.70.0000.00816.75
8.0.60.0050.00316.89
8.0.50.0040.00416.90
8.0.30.0070.00917.10
8.0.20.0090.01217.40
8.0.10.0000.00716.94
8.0.00.0050.01516.70
7.4.330.0030.00315.08
7.4.320.0060.00016.53
7.4.300.0030.00316.60
7.4.290.0000.01016.61
7.4.280.0040.00416.49
7.4.270.0000.00716.58
7.4.260.0030.00516.43
7.4.250.0040.00416.59
7.4.240.0030.00416.54
7.4.230.0070.00016.36
7.4.220.0030.01316.50
7.4.210.0030.01216.56
7.4.200.0050.00216.51
7.4.160.0150.00316.39
7.4.150.0150.00817.40
7.4.140.0170.01817.86
7.4.130.0110.00816.45
7.4.120.0150.00216.61
7.4.110.0090.01216.37
7.4.100.0100.01316.44
7.4.90.0100.00616.53
7.4.80.0070.01019.39
7.4.70.0070.01016.48
7.4.60.0030.01216.43
7.4.50.0000.00816.29
7.4.40.0180.00016.62
7.4.30.0110.00616.79
7.4.00.0060.01015.06
7.3.330.0000.00613.27
7.3.320.0000.00613.23
7.3.310.0050.00316.32
7.3.300.0030.00316.35
7.3.290.0120.00716.31
7.3.280.0090.01016.26
7.3.270.0060.01217.40
7.3.260.0060.01016.44
7.3.250.0060.01316.30
7.3.240.0080.01316.50
7.3.230.0120.00616.39
7.3.210.0130.00316.53
7.3.200.0070.01116.62
7.3.190.0090.00616.50
7.3.180.0110.01116.37
7.3.170.0060.01016.58
7.3.160.0130.00316.32
7.3.10.0040.00716.49
7.3.00.0000.01116.74
7.2.330.0100.00716.68
7.2.320.0090.00916.64
7.2.310.0070.01116.33
7.2.300.0070.01116.77
7.2.290.0180.00016.57
7.2.130.0070.00316.77
7.2.120.0090.00616.84
7.2.110.0100.00316.78
7.2.100.0130.00016.71
7.2.90.0030.01016.98
7.2.80.0040.00816.88
7.2.70.0080.00417.02
7.2.60.0030.00816.72
7.2.50.0060.00616.79
7.2.40.0030.00917.07
7.2.30.0060.00817.05
7.2.20.0100.00316.54
7.2.10.0130.00016.74
7.2.00.0070.00718.26
7.1.250.0030.00715.77
7.1.200.0060.00615.75
7.1.100.0000.01117.75
7.1.70.0000.00917.11
7.1.60.0000.01319.27
7.1.50.0050.00516.71
7.1.00.0070.07322.31
7.0.200.0100.00616.63
7.0.100.0330.07320.01
7.0.90.0170.08019.90
7.0.80.0270.06719.83
7.0.70.0070.06719.89
7.0.60.0030.08719.95
7.0.50.0100.07720.27
7.0.40.0100.07720.11
7.0.30.0100.07720.05
7.0.20.0130.06020.19
7.0.10.0130.09020.07
7.0.00.0200.05020.03
5.6.280.0030.06321.10
5.6.250.0200.06720.61
5.6.240.0200.03720.65
5.6.230.0070.05020.67
5.6.220.0170.04320.66
5.6.210.0070.04720.76
5.6.200.0130.07321.07
5.6.190.0130.07721.03
5.6.180.0070.04021.05
5.6.170.0100.09020.91
5.6.160.0070.05021.03
5.6.150.0070.08721.14
5.6.140.0130.04321.03
5.6.130.0030.08321.01
5.6.120.0130.07720.94
5.6.110.0130.07021.08
5.6.100.0070.04021.02
5.6.90.0100.04321.02
5.6.80.0070.05020.50
5.6.70.0070.07720.49
5.6.60.0070.07320.40
5.6.50.0100.06020.50
5.6.40.0030.07020.50
5.6.30.0070.05020.42
5.6.20.0000.04320.45
5.6.10.0030.04020.39
5.6.00.0070.03320.36
5.5.380.0200.06720.46
5.5.370.0130.07720.38
5.5.360.0030.08320.39
5.5.350.0030.04720.43
5.5.340.0070.07020.65
5.5.330.0130.04720.81
5.5.320.0070.08020.77
5.5.310.0070.08020.89
5.5.300.0030.09020.85
5.5.290.0070.05020.87
5.5.280.0100.06720.89
5.5.270.0170.07720.80
5.5.260.0170.06320.75
5.5.250.0100.07720.54
5.5.240.0170.06320.16
5.5.230.0100.07720.29
5.5.220.0130.07020.28
5.5.210.0100.07320.15
5.5.200.0030.08020.29
5.5.190.0030.05020.16
5.5.180.0070.04720.09
5.5.160.0100.03320.13
5.5.150.0030.04320.11
5.5.140.0000.04320.28
5.5.130.0070.03720.25
5.5.120.0030.06320.16
5.5.110.0030.04320.28
5.5.100.0100.03020.03
5.5.90.0030.03720.08
5.5.80.0130.03020.08
5.5.70.0070.05020.11
5.5.60.0070.03720.13
5.5.50.0070.03720.07
5.5.40.0130.03020.13
5.5.30.0000.04320.06
5.5.20.0000.04320.00
5.5.10.0100.03320.12
5.5.00.0000.04320.12
5.4.450.0030.08019.21
5.4.440.0030.07319.18
5.4.430.0070.05019.45
5.4.420.0100.07019.57
5.4.410.0170.07019.34
5.4.400.0100.04318.86
5.4.390.0130.06719.14
5.4.380.0100.07319.12
5.4.370.0130.06719.24
5.4.360.0070.06319.23
5.4.350.0070.06018.96
5.4.340.0000.04319.04
5.4.320.0030.04019.23
5.4.310.0130.03019.01
5.4.300.0100.03019.14
5.4.290.0000.04019.05
5.4.280.0070.03719.05
5.4.270.0030.03719.05
5.4.260.0030.05019.03
5.4.250.0070.03719.12
5.4.240.0070.03318.85
5.4.230.0070.05018.96
5.4.220.0070.03718.88
5.4.210.0030.03719.17
5.4.200.0030.06019.09
5.4.190.0000.04319.20
5.4.180.0070.03319.19
5.4.170.0070.04019.04
5.4.160.0070.03318.83
5.4.150.0030.04019.22
5.4.140.0070.03316.35
5.4.130.0070.03316.47
5.4.120.0100.02716.48
5.4.110.0100.03016.33
5.4.100.0000.05016.53
5.4.90.0000.03716.45
5.4.80.0130.02316.55
5.4.70.0000.03716.51
5.4.60.0000.03716.42
5.4.50.0000.04316.34
5.4.40.0030.03716.32
5.4.30.0130.02716.26
5.4.20.0000.04016.31
5.4.10.0030.03716.54
5.4.00.0030.03315.89

preferences:
51.79 ms | 400 KiB | 5 Q