3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { static function a() { printf("in method: %s\nself: %s\nstatic: %s\n", __METHOD__, self::class, static::class); } } class B extends A { } $c = Closure::fromCallable('A::a'); print "getClosureScopeClass A::a:\n"; var_dump((new ReflectionFunction($c))->getClosureScopeClass()->getName()); $c(); print "\n"; $c = Closure::fromCallable('B::a'); print "getClosureScopeClass B::a:\n"; var_dump((new ReflectionFunction($c))->getClosureScopeClass()->getName()); $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.00.0110.01222.96
8.4.150.0020.00114.05
8.4.140.0150.00817.59
8.4.130.0070.01318.91
8.4.120.0070.01120.51
8.4.110.0120.00818.70
8.4.100.0130.00817.60
8.4.90.0110.00920.76
8.4.80.0070.00318.84
8.4.70.0090.00820.71
8.4.60.0100.00820.39
8.4.50.0100.01118.67
8.4.40.0030.00618.03
8.4.30.0160.00320.18
8.4.20.0070.01117.77
8.4.10.0100.00622.02
8.3.280.0110.00918.41
8.3.270.0080.01116.35
8.3.260.0130.00716.38
8.3.250.0080.00916.36
8.3.240.0030.00816.57
8.3.230.0120.00616.41
8.3.220.0100.00818.93
8.3.210.0080.00918.25
8.3.200.0050.00516.53
8.3.190.0100.01018.79
8.3.180.0120.00618.96
8.3.170.0100.01016.96
8.3.160.0120.00616.36
8.3.150.0100.01016.39
8.3.140.0040.00416.50
8.3.130.0040.00416.67
8.3.120.0120.00619.01
8.3.110.0130.00720.94
8.3.100.0030.00624.06
8.3.90.0040.00426.77
8.3.80.0090.00016.38
8.3.70.0070.00716.58
8.3.60.0120.00316.38
8.3.50.0120.00420.22
8.3.40.0110.00421.94
8.3.30.0110.00418.65
8.3.20.0040.00424.18
8.3.10.0080.00024.66
8.3.00.0070.00026.16
8.2.290.0110.00817.16
8.2.280.0130.00320.10
8.2.270.0130.00316.66
8.2.260.0080.00017.41
8.2.250.0080.00016.68
8.2.240.0000.00818.87
8.2.230.0040.00422.58
8.2.220.0080.00037.54
8.2.210.0110.00426.77
8.2.200.0090.00016.50
8.2.190.0110.00716.63
8.2.180.0150.00425.92
8.2.170.0040.01118.94
8.2.160.0030.01022.96
8.2.150.0070.00025.66
8.2.140.0050.00324.66
8.2.130.0080.00026.16
8.2.120.0000.00726.16
8.2.110.0090.00022.18
8.2.100.0040.00717.78
8.2.90.0040.00419.21
8.2.80.0000.00817.97
8.2.70.0050.00517.50
8.2.60.0050.00317.92
8.2.50.0060.00318.07
8.2.40.0000.00818.14
8.2.30.0000.00718.09
8.2.20.0070.00020.53
8.2.10.0050.00217.89
8.2.00.0040.00819.21
8.1.330.0110.00816.17
8.1.320.0120.00717.91
8.1.310.0030.01418.21
8.1.300.0150.00316.09
8.1.290.0060.00318.88
8.1.280.0070.00725.92
8.1.270.0040.00423.99
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0000.00820.69
8.1.230.0060.00619.57
8.1.220.0030.00617.74
8.1.210.0040.00418.77
8.1.200.0070.00317.35
8.1.190.0040.00417.25
8.1.180.0000.00818.10
8.1.170.0080.00018.46
8.1.160.0040.00418.86
8.1.150.0040.00418.61
8.1.140.0040.00417.43
8.1.130.0060.00320.48
8.1.120.0000.00917.32
8.1.110.0040.00417.43
8.1.100.0000.00717.46
8.1.90.0180.00017.43
8.1.80.0140.00317.35
8.1.70.0140.00317.35
8.1.60.0110.00617.52
8.1.50.0120.00817.42
8.1.40.0110.00817.37
8.1.30.0100.01017.51
8.1.20.0150.00317.68
8.1.10.0190.00317.54
8.1.00.0210.00017.47
8.0.300.0040.00418.77
8.0.290.0050.00216.63
8.0.280.0070.00018.38
8.0.270.0000.00718.04
8.0.260.0040.00418.39
8.0.250.0000.00716.82
8.0.240.0040.00416.93
8.0.230.0000.00816.78
8.0.220.0140.00316.79
8.0.210.0170.00016.79
8.0.200.0150.00416.91
8.0.190.0150.00016.86
8.0.180.0120.00416.85
8.0.170.0050.01016.86
8.0.160.0160.00016.76
8.0.150.0160.00016.64
8.0.140.0130.00316.80
8.0.130.0150.00016.79
8.0.120.0090.00916.84
8.0.110.0090.00516.70
8.0.100.0090.00716.71
8.0.90.0130.00316.77
8.0.80.0170.00016.71
8.0.70.0060.01116.61
8.0.60.0140.00316.77
8.0.50.0150.00016.73
8.0.30.0140.00216.82
8.0.20.0100.00416.94
8.0.10.0120.00416.91
7.4.330.0000.00515.55
7.4.320.0000.00616.47
7.4.300.0110.00516.28
7.4.290.0120.00616.38
7.4.280.0130.00316.27
7.4.270.0140.00616.43
7.4.260.0060.01116.32
7.4.250.0120.00716.34
7.4.240.0120.00416.34
7.4.230.0150.00416.41
7.4.220.0110.00516.40
7.4.210.0060.01016.26
7.4.200.0090.00616.38
7.4.190.0100.00516.43
7.4.180.0120.00416.45
7.4.160.0060.00916.49
7.4.150.0090.00616.37
7.4.140.0120.00216.42
7.4.130.0050.00916.09
7.4.120.0120.00416.23
7.4.110.0090.00516.37
7.4.100.0070.00416.33
7.4.90.0070.00016.20
7.4.80.0000.00916.25
7.4.70.0060.00316.31
7.4.60.0040.00416.20
7.4.50.0030.00616.17
7.4.40.0040.00416.05
7.4.30.0030.00516.28
7.4.20.0040.00416.23
7.4.10.0030.00516.16
7.4.00.0040.00416.29

preferences:
39.32 ms | 403 KiB | 5 Q