sagittaracc / reflection

Repository from Github https://github.comsagittaracc/reflectionRepository from Github https://github.comsagittaracc/reflection

Пример

namespace sagittaracc\classes;

class Test
{
    public function method()
    {
        if (true) {
            return 'this method';
        }

        return 'never goes here';
    }
}
$reflection = new ReflectionClass(Test::class);
$method = $reflection->getMethod('method');
echo $method->body; // if (true) { return 'this method'; }  return 'never goes here';

About

License:MIT License


Languages

Language:PHP 100.0%