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