Skip to content

Latest commit

 

History

History
23 lines (19 loc) · 406 Bytes

README.md

File metadata and controls

23 lines (19 loc) · 406 Bytes

Пример

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';