- Output for 5.6.38, 7.1.0 - 7.1.23, 7.2.0 - 7.2.11
- Parse error: syntax error, unexpected ':' in /in/v2lPE on line 43
Process exited with code 255.
<?php
class A {
private $b;
function __construc($b) {
$this->b = $b;
}
function __get($name)
{
echo "get $name \n";
return $this->$name;
}
function __isset($name)
{
echo "isset $name\n";
return true;
}
}
class B {
private $c;
function __construc($c) {
$this->c = $c;
}
function __get($name)
{
echo "get $name \n";
return $this->$name;
}
function __isset($name)
{
echo "isset $name\n";
return true;
}
}
$c = new B('plop'):
$b = new B($c);
$a = new A($b);
var_dump(isset($a->b->d));