3v4l.org

run code in 500+ PHP versions simultaneously
<?php declare(strict_types=1); /** * @template T * * @param ReflectionClass<T> $class * * @return array<int, method-string<T>> */ function MethodNames(ReflectionClass $class, int $filter = null) : array { return array_map( /** * @return method-string<T> */ function (ReflectionMethod $method) : string { return $method->name; }, $class->getMethods($filter) ); }

preferences:
56.1 ms | 1622 KiB | 5 Q