3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public function getClosure() { var_dump(self::class, static::class); return function () { }; } } class B extends A { } $b = new B(); $c = $b->getClosure(); $r = new ReflectionFunction($c); var_dump($r->getClosureThis() === $b); var_dump($r->getClosureScopeClass()); // self::class var_dump($r->getClosureCalledClass()); // static::class

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.20.0090.00819.99
8.5.10.0120.00916.84
8.5.00.0110.01220.04
8.4.170.0120.01121.85
8.4.160.0150.00621.96
8.4.150.0030.00014.05
8.4.140.0160.00617.64
8.4.130.0100.01017.68
8.4.120.0120.00820.66
8.4.110.0140.00822.09
8.4.100.0070.00217.75
8.4.90.0110.01022.45
8.4.80.0060.00519.65
8.4.70.0060.00218.04
8.4.60.0140.00719.15
8.4.50.0100.01120.51
8.4.40.0060.01318.80
8.4.30.0160.00320.39
8.4.20.0150.00021.18
8.4.10.0030.00619.47
8.3.300.0150.00419.13
8.3.290.0090.01120.71
8.3.280.0160.00818.26
8.3.270.0070.01216.43
8.3.260.0110.00916.16
8.3.250.0070.00120.64
8.3.240.0100.00616.76
8.3.230.0100.00916.50
8.3.220.0090.00919.04
8.3.210.0090.01016.63
8.3.200.0050.00416.53
8.3.190.0080.01117.09
8.3.180.0040.00516.57
8.3.170.0150.00317.21
8.3.160.0070.01120.75
8.3.150.0030.01716.96
8.3.140.0060.00916.48
8.3.130.0340.00616.18
8.3.120.0380.00316.18
8.3.110.0310.00916.44
8.3.100.0450.00316.30
8.3.90.0350.00916.18
8.3.80.0310.01016.46
8.3.70.0360.01016.34
8.3.60.0370.00716.54
8.3.50.0270.01416.50
8.3.40.0220.00917.48
8.3.30.0220.01117.23
8.3.20.0140.00717.44
8.3.10.0300.00617.28
8.3.00.0120.01217.14
8.2.300.0120.00820.42
8.2.290.0130.00520.69
8.2.280.0110.00818.34
8.2.270.0120.00616.46
8.2.260.0110.00716.90
8.2.250.0250.01416.47
8.2.240.0240.01416.61
8.2.230.0240.01416.63
8.2.220.0250.01316.23
8.2.210.0320.00616.33
8.2.200.0280.00916.47
8.2.190.0350.00316.55
8.2.180.0280.01016.37
8.2.170.0350.00417.59
8.2.160.0290.00417.46
8.2.150.0310.00917.29
8.2.140.0400.00017.54
8.2.130.0420.00417.27
8.2.120.0390.00917.16
8.2.110.0380.00717.34
8.2.100.0290.01017.35
8.2.90.0330.00617.48
8.2.80.0310.00817.11
8.2.70.0360.00317.41
8.2.60.0310.00817.41
8.2.50.0290.01017.39
8.2.40.0240.01417.34
8.2.30.0250.01617.53
8.2.20.0200.01317.44
8.2.10.0200.01617.40
8.2.00.0270.00917.46
8.1.340.0170.00820.16
8.1.330.0090.00922.07
8.1.320.0110.00816.28
8.1.310.0100.01016.54
8.1.300.0260.01316.18
8.1.290.0500.00716.18
8.1.280.0280.00916.26
8.1.270.0430.00417.21
8.1.260.0310.00317.48
8.1.250.0360.00417.05
8.1.240.0300.00516.95
8.1.230.0320.00317.39
8.1.220.0260.00617.27
8.1.210.0270.00917.19
8.1.200.0250.01017.00
8.1.190.0180.01417.07
8.1.180.0290.00617.26
8.1.170.0310.00317.03
8.1.160.0180.01117.23
8.1.150.0270.01017.10
8.1.140.0330.00316.98
8.1.130.0250.01117.20
8.1.120.0310.00316.94
8.1.110.0230.00617.29
8.1.100.0190.01017.39
8.1.90.0340.00317.25
8.1.80.0250.01117.17
8.1.70.0290.00617.18
8.1.60.0390.00017.40
8.1.50.0330.00517.12
8.1.40.0310.00816.98
8.1.30.0340.00417.43
8.1.20.0310.00817.25
8.1.10.0380.00017.39
8.1.00.0330.00717.26

preferences:
29.59 ms | 403 KiB | 5 Q