3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait T { public function self(): self { return $this; } public function parent(): parent { return $this; } public function static(): static { return $this; } } $selfType = (new ReflectionMethod(T::class, 'self'))->getReturnType(); var_dump($selfType::class, $selfType->getName()); $parentType = (new ReflectionMethod(T::class, 'parent'))->getReturnType(); var_dump($parentType::class, $parentType->getName()); $staticType = (new ReflectionMethod(T::class, 'static'))->getReturnType(); var_dump($staticType::class, $staticType->getName()); final class A { use T; } $selfType = (new ReflectionMethod(A::class, 'self'))->getReturnType(); var_dump($selfType::class, $selfType->getName()); $parentType = (new ReflectionMethod(A::class, 'parent'))->getReturnType(); var_dump($parentType::class, $parentType->getName()); $staticType = (new ReflectionMethod(A::class, 'static'))->getReturnType(); var_dump($staticType::class, $staticType->getName());

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.4.20.0160.00319.62
8.4.10.0040.01419.57
8.3.150.0200.00316.71
8.3.140.0040.00416.66
8.3.130.0040.00417.23
8.3.120.0060.00318.96
8.3.110.0050.00318.18
8.3.100.0360.01237.54
8.3.90.0410.00937.54
8.3.80.0330.01037.54
8.3.70.0370.00737.54
8.3.60.0390.00537.54
8.3.50.0350.00737.54
8.3.40.0270.00837.54
8.3.30.0290.00737.54
8.3.20.0320.00337.54
8.3.10.0310.00837.54
8.3.00.0240.00737.54
8.2.270.0130.00617.00
8.2.260.0060.01017.12
8.2.250.0080.00016.81
8.2.240.0100.00716.50
8.2.230.0080.00020.94
8.2.220.0120.00637.54
8.2.210.0180.00837.54
8.2.200.0270.00937.54
8.2.190.0270.00837.54
8.2.180.0210.01237.54
8.2.170.0320.00437.54
8.2.160.0280.00937.54
8.2.150.0330.00437.54
8.2.140.0280.01037.54
8.2.130.0330.00337.54
8.2.120.0270.00737.54
8.2.110.0250.01037.54
8.2.100.0260.00837.54
8.2.90.0250.00737.54
8.2.80.0200.00737.54
8.2.70.0270.00937.54
8.2.60.0290.00537.54
8.2.50.0230.01037.54
8.2.40.0270.00837.54
8.2.30.0250.00437.54
8.2.20.0230.00437.54
8.2.10.0210.00137.54
8.2.00.0230.00337.54
8.1.310.0040.00416.94
8.1.300.0130.00315.85
8.1.290.0250.00437.54
8.1.280.0170.01037.54
8.1.270.0210.00737.54
8.1.260.0210.00737.54
8.1.250.0190.00537.54
8.1.240.0170.00837.54
8.1.230.0210.00237.54
8.1.220.0210.00337.54
8.1.210.0220.00737.54
8.1.200.0260.00837.54
8.1.190.0240.00737.54
8.1.180.0260.00737.54
8.1.170.0270.00737.54
8.1.160.0280.00637.54
8.1.150.0280.00737.54
8.1.140.0270.00537.54
8.1.130.0220.00437.54
8.1.120.0220.00337.54
8.1.110.0160.01037.54
8.1.100.0190.00737.54
8.1.90.0230.00737.54
8.1.80.0200.00837.54
8.1.70.0210.00537.54
8.1.60.0330.00637.54
8.1.50.0260.00837.54
8.1.40.0220.00637.54
8.1.30.0190.00737.54
8.1.20.0230.00437.54
8.1.10.0250.00337.54
8.1.00.0180.00937.54

preferences:
31.09 ms | 403 KiB | 5 Q