3v4l.org

run code in 300+ PHP versions simultaneously
<?php class foo { private $arr; public function __construct() { $this->arr = [new \Stdclass]; } public function __get($field) { return $this->{$field}; } } $foo = new foo(); var_dump(empty($foo->arr)); // Expected false?

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
213.57 ms | 2062 KiB | 9 Q