3v4l.org

run code in 500+ PHP versions simultaneously
<?php final class SkipUsedByReflectionAsArrayCallable { public function run(): int { $reflectionMethod = new \ReflectionMethod(...[$this, 'methodInjection']); return $reflectionMethod->getNumberOfParameters(); } private function methodInjection(\stdClass $contextArgument): void { } } $obj = new SkipUsedByReflectionAsArrayCallable(); echo $obj->run();
Output for 8.1.34, 8.2.32, 8.3.5 - 8.3.32, 8.4.9 - 8.4.23, 8.5.7 - 8.5.8
1

preferences:
55.77 ms | 525 KiB | 4 Q