Call Function With Strings

no-email (Damien Seguy), Damien Seguy
Sat, 07 Dec 2024 00:00:00 +0000

Usually, a function is called with its name as first element of the syntax.
And it is also possible to use a string, either in a variable or directly as a literal. This means that adding single or double quotes to the name of a function is still a valid syntax.
Of course, there is still the left over binary string of PHP 6, so it is also possible to add an initial ``b`` to the string.
Then, the double quoted strings accepts interpolated variables, to make the call dynamic.
Finally, it is not possible to use the HereDoc syntax, as parenthesis are not allowed directly after the closing tag.