<?php
$c = new c();
var_dump(isset($c->a)); // no problem
var_dump(isset($c->a->b)); // undefined index: a
var_dump(isset($c->b->c)); // undefined index: b
var_dump(isset($c->d['e'])); // undefined index: d
class c {
public $x = array();
public function __get($name) {
return $this->__isset($name) ? $this->x[$name] : null;
}
public function __isset($name) {
return isset($this->x[$name]);
}
}
?>
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/IDfeo on line 10
Process exited with code 255.
Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/IDfeo on line 10
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in /in/IDfeo on line 10
Process exited with code 255.