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(): void { } } $obj = new SkipUsedByReflectionAsArrayCallable(); echo $obj->run();
Output for 8.1.34
0

preferences:
161.12 ms | 1102 KiB | 13 Q