- print_r: documentation ( source)
- get_object_vars: documentation ( source)
<?php
class V
{
public $something1 = null;
protected $something2 = false;
private $something3 = 'HELLO';
const HELLO = 'DUDE';
public static $hello = 'DUDE';
public function __construct()
{
print_r( get_object_vars( $this ) );
}
}
$v = new V;