PHP code example of sajadsdi / php-reflection

1. Go to this page and download the library: Download sajadsdi/php-reflection 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/ */

    

sajadsdi / php-reflection example snippets


use Sajadsdi\PhpReflection\Reflections;

$reflections = new Reflections();

$class = new MyClass();
$reflectionClass = $reflections->reflection($class);

//or
$reflectionClass = $reflections->reflection(MyClass::class);


$properties = $reflections->properties(MyClass::class);
$methods = $reflections->methods(MyClass::class);
$constants = $reflections->constants(MyClass::class);
bash
composer