- var_dump: documentation ( source)
<?php
class PhpClassWithPropertyDefaults
{
public $propertyWithoutDefault;
public $propertyWithNullDefault = null;
public $propertyWithTrueDefault = true;
}
$class = new ReflectionClass('PhpClassWithPropertyDefaults');
var_dump($class->getProperty('propertyWithoutDefault'));
var_dump($class->getProperty('propertyWithNullDefault'));
var_dump($class->getProperty('propertyWithTrueDefault'));