- var_dump: documentation ( source)
<?php
class ClassName {
private $property = 42;
}
$obj = new ClassName();
var_dump($obj);
$refObject = new ReflectionObject( $obj );
$refProperty = $refObject->getProperty( 'property' );
$refProperty->setAccessible( true );
//$refProperty->setValue($obj, 'new value');
$obj->property = 'miauw';
var_dump($obj);