3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public static $staticProperty = 'foobar'; public $property = 'barfoo'; } $reflectionClass = new ReflectionClass('Foo'); var_dump($reflectionClass->getProperty('staticProperty')->getValue()); var_dump($reflectionClass->getProperty('staticProperty')->getValue(new Foo)); var_dump($reflectionClass->getProperty('property')->getValue(new Foo));

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
170.03 ms | 3345 KiB | 9 Q