<?php
class PhpClassWithPropertyDefaults
{
public $propertyWithoutDefault;
public $propertyWithNullDefault = null;
}
$class = new ReflectionClass('PhpClassWithPropertyDefaults');
$defaults = $class->getDefaultProperties();
var_dump($defaults);
var_dump($class->getProperty('propertyWithoutDefault')->__toString());
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/Ca5Oh on line 4
Process exited with code 255.
Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/Ca5Oh on line 4
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in /in/Ca5Oh on line 4
Process exited with code 255.