ovr / phpreflection
Advanced reflection for PHP, powered by own database with all description
Installs: 16 939
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 4
Forks: 0
Open Issues: 0
Requires
- php: >=5.5
Requires (Dev)
- phpunit/phpunit: ~4.8
- squizlabs/php_codesniffer: ~2.6
README
Function reflection
You can get function reflection by using getFunction
from $reflector
:
$reflector = new Reflector(Reflector::manuallyFactory()); $reflection = $reflector->getFunction('gettype');
Next you can use methods from FunctionReflection
, for example:
var_dump($reflection->getNumberOfParameters()); var_dump($reflection->getNumberOfRequiredParameters());
At all, you can run function
from $reflection
var_dump($reflection->run(array(1))); //float