PHP code example of phputil / rtti
1. Go to this page and download the library: Download phputil/rtti 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/ */
phputil / rtti example snippets
phputil\RTTI;
class User {
private $name;
function __construct( $n ) { $this->name = $n; }
function getName() { return $this->name; }
}
// array( 'user' => 'Bob' )
var_dump( RTTI::getAttributes( new User( 'Bob' ), RTTI::allFlags() ) );