- var_dump: documentation ( source)
<?php
class Foo
{
public int $bar;
public function __get($name)
{
//return 'string'; // Can no longer do this
return 999; // Type has to match
}
}
$foo = new Foo();
var_dump($foo->bar);