https://github.com/sagittaracc/reflection
https://github.com/sagittaracc/reflection
php php-extension php-extensions php-reflection reflection-library
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/sagittaracc/reflection
- Owner: sagittaracc
- License: mit
- Created: 2021-09-08T07:54:36.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-03-14T13:13:33.000Z (about 3 years ago)
- Last Synced: 2025-02-05T08:51:32.339Z (4 months ago)
- Topics: php, php-extension, php-extensions, php-reflection, reflection-library
- Language: PHP
- Homepage:
- Size: 20.5 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
### Пример
```php
namespace sagittaracc\classes;class Test
{
public function method()
{
if (true) {
return 'this method';
}return 'never goes here';
}
}
``````php
$reflection = new ReflectionClass(Test::class);
$method = $reflection->getMethod('method');
echo $method->body; // if (true) { return 'this method'; } return 'never goes here';
```