3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public static function F() { return "A"; } } $c = (function() { var_dump(static::F()); })->bindTo(new A, NULL); var_dump((new \ReflectionFunction($c))->getClosureScopeClass()->name); $c(); $c = (function() { var_dump(self::F()); })->bindTo(new A, "A"); var_dump((new \ReflectionFunction($c))->getClosureScopeClass()->name); $c(); $c = (function() { var_dump(self::F()); })->bindTo(new A, NULL); var_dump((new \ReflectionFunction($c))->getClosureScopeClass()->name); $c();

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.5.10.0100.00820.24
8.5.00.0120.01024.53
8.4.150.0020.00114.05
8.4.140.0100.01117.94
8.4.130.0070.00419.50
8.4.120.0140.00620.58
8.4.110.0110.00622.45
8.4.100.0100.01117.96
8.4.90.0110.00918.50
8.4.80.0120.00718.82
8.4.70.0060.00618.07
8.4.60.0120.00918.78
8.4.50.0080.00818.82
8.4.40.0070.01318.87
8.4.30.0150.00418.55
8.4.20.0040.00417.90
8.4.10.0100.00622.08
8.3.280.0140.00618.62
8.3.270.0140.01016.91
8.3.260.0030.00716.71
8.3.250.0110.00818.84
8.3.240.0060.01416.85
8.3.230.0140.00716.72
8.3.220.0110.00817.07
8.3.210.0150.00416.68
8.3.200.0050.00416.65
8.3.190.0120.00618.85
8.3.180.0060.00816.47
8.3.170.0090.00918.75
8.3.160.0040.00417.19
8.3.150.0000.01019.07
8.3.140.0180.00016.68
8.3.130.0050.00518.35
8.3.120.0030.00620.56
8.3.110.0090.00016.54
8.3.100.0090.00016.56
8.3.90.0030.01126.77
8.3.80.0110.00016.50
8.3.70.0090.01216.61
8.3.60.0100.01318.43
8.3.50.0100.00720.23
8.3.40.0110.00720.04
8.3.30.0140.00718.85
8.3.20.0030.00924.18
8.3.10.0050.00324.66
8.3.00.0030.00526.16
8.2.290.0040.00420.46
8.2.280.0090.00818.69
8.2.270.0120.00617.38
8.2.260.0070.00316.61
8.2.250.0000.00818.30
8.2.240.0040.01516.85
8.2.230.0110.00420.94
8.2.220.0000.00924.06
8.2.210.0110.00826.77
8.2.200.0090.00018.41
8.2.190.0070.01118.66
8.2.180.0120.00925.92
8.2.170.0130.00318.89
8.2.160.0030.01022.96
8.2.150.0070.00025.66
8.2.140.0050.00324.66
8.2.130.0040.00426.16
8.2.120.0070.00026.16
8.2.110.0100.00020.35
8.2.100.0040.00717.72
8.2.90.0040.00417.63
8.2.80.0090.00018.87
8.2.70.0080.00017.49
8.2.60.0080.00017.75
8.2.50.0040.00417.98
8.2.40.0040.00418.09
8.2.30.0060.00318.09
8.2.20.0050.00219.32
8.2.10.0040.00417.98
8.2.00.0090.00019.24
8.1.330.0090.01021.93
8.1.320.0150.00416.32
8.1.310.0040.00418.54
8.1.300.0090.00018.20
8.1.290.0060.00330.84
8.1.280.0040.01525.92
8.1.270.0050.00322.21
8.1.260.0080.00026.35
8.1.250.0000.00828.09
8.1.240.0090.00023.86
8.1.230.0110.00022.07
8.1.220.0050.00318.55
8.1.210.0050.00318.77
8.1.200.0030.00617.36
8.1.190.0040.00417.35
8.1.180.0040.00418.10
8.1.170.0050.00317.62
8.1.160.0000.00718.82
8.1.150.0000.01018.61
8.1.140.0030.00617.46
8.1.130.0030.00320.81
8.1.120.0070.00017.38
8.1.110.0000.00717.39
8.1.100.0080.00017.35
8.1.90.0100.00017.35
8.1.80.0080.00317.47
8.1.70.0060.00317.43
8.1.60.0070.00317.43
8.1.50.0120.00017.39
8.1.40.0080.00517.41
8.1.30.0030.00617.68
8.1.20.0080.00417.61
8.1.10.0030.00917.43
8.1.00.0120.00817.51
8.0.300.0080.00019.94
8.0.290.0070.00016.74
8.0.280.0000.00718.39
8.0.270.0080.00016.80
8.0.260.0030.00318.39
8.0.250.0000.00716.86
8.0.240.0040.00416.88
8.0.230.0000.00616.96
8.0.220.0150.00016.90
8.0.210.0040.01116.77
8.0.200.0110.00417.02
8.0.190.0070.00216.97
8.0.180.0120.00316.92
8.0.170.0070.00716.97
8.0.160.0090.00517.00
8.0.150.0130.00316.86
8.0.140.0130.00316.89
8.0.130.0070.00716.91
8.0.120.0140.00016.90
8.0.110.0140.00016.78
8.0.100.0100.00516.96
8.0.90.0110.00416.85
8.0.80.0100.00517.00
8.0.70.0120.00416.70
8.0.60.0100.00316.85
8.0.50.0150.00016.93
8.0.30.0120.00316.90
8.0.20.0050.01017.07
8.0.10.0110.00517.09
7.4.330.0030.00315.55
7.4.320.0070.00016.60
7.4.300.0050.00316.46
7.4.290.0110.00416.64
7.4.280.0070.01116.62
7.4.270.0090.00916.45
7.4.260.0150.00016.54
7.4.250.0130.00316.55
7.4.240.0140.00316.52
7.4.230.0150.00416.55
7.4.220.0140.00316.54
7.4.210.0120.00316.41
7.4.200.0090.00616.51
7.4.190.0130.00316.61
7.4.180.0130.00316.42
7.4.160.0150.00016.54
7.4.150.0000.01516.49
7.4.140.0150.00016.42
7.4.130.0130.00016.60
7.4.120.0120.00316.41
7.4.110.0040.01116.47
7.4.100.0140.00016.61
7.4.90.0000.01416.39
7.4.80.0050.00516.39
7.4.70.0030.00716.44
7.4.60.0060.00316.50
7.4.50.0080.00416.44
7.4.40.0150.00016.36
7.4.30.0070.00716.42
7.4.20.0060.00316.48
7.4.10.0110.00016.54
7.4.00.0120.00216.57

preferences:
34.2 ms | 403 KiB | 5 Q