ovr/phpreflection

Advanced reflection for PHP, powered by own database with all description

0.3.1 2016-06-04 14:48 UTC

This package is auto-updated.

Last update: 2024-11-29 03:48:52 UTC


README

Build Status

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