https://github.com/sagittaracc/reflection
https://github.com/sagittaracc/reflection
php php-extension php-extensions php-reflection reflection-library
Last synced: 6 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/sagittaracc/reflection
- Owner: sagittaracc
- License: mit
- Created: 2021-09-08T07:54:36.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-03-14T13:13:33.000Z (almost 4 years ago)
- Last Synced: 2025-03-30T06:44:04.580Z (11 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';
```