3v4l.org

run code in 300+ PHP versions simultaneously
<?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.3.25, 5.4.0 - 5.4.15
Parse error: syntax error, unexpected ';' in /in/QA8rI on line 12
Process exited with code 255.

preferences:
179.06 ms | 1395 KiB | 49 Q