I'm looking for more information about the PHP feature that looks like:
$obj->{$prop};
$obj->{$method}();
What is it called? Is it documented? Where?
Edit:
To clarify - I'm asking about the syntax with the curly braces that you can use to have dynamic complex lookups of object properties or methods. For instance, as reported by php -l
, these are valid:
echo $obj->{"val"}; // property lookup with string literal
echo $obj->{$method()->{$var}}(); // complex method lookup
echo $obj::${$other::$something}; // static property lookup
But this is not:
echo $obj::{$other::$something}; // class constant lookup
I'm searching for something "official" that outlines what is and isn't valid with that kind of syntax, if such a document exists.