3 ms·
I think it would have been worth pointing out the slightly more readable syntax for variable variables (and other metaprogramming features within PHP): ${$
by FuzzyDunlop 14y ago
I think it would have been worth pointing out the slightly more readable syntax for variable variables (and other metaprogramming features within PHP):
${$var};
${$name.'Controller'}->function();
$something->{$functionName}();
With all the appropriate warnings, of course. For a start, don't find excuses to implement this style of code. You almost certainly don't need it for a basic website.