3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?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');
Output for 5.3.0 - 5.4.15
Parse error: syntax error, unexpected ';' in /in/QA8rI on line 12
Process exited with code 255.