I saw in this SO answer that you can use a string inside curly braces to call a PHP class method to
$player->SayHi();
May be alternative, like:
$player->{'SayHi'}();
My questions:
What is this syntax called in PHP? and what happens if the wrong string is used that does not match the method?
Also, can I use this syntax to call non-classical methods?
I looked at the answers in a related post, and there are only links to PHP callback syntax that doesn't seem to cover the curly brace syntax.
Thank,
source
share