PHP code example of ovr / phpreflection
1. Go to this page and download the library: Download ovr/phpreflection library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
ovr / phpreflection example snippets
$reflector = new Reflector(Reflector::manuallyFactory());
$reflection = $reflector->getFunction('gettype');
var_dump($reflection->getNumberOfParameters());
var_dump($reflection->getNumberOfRequiredParameters());
var_dump($reflection->run(array(1))); //float