Why do I get a parse error with this code:
$func = "do_{$something}" = $func();
?
It should be correct because
$func = "do_{$something}";
$func = $func();
works...
Look at this code as an example:
$a = $b = 3;
If assignment would work from the left, this'll be parsed as:
$a = $b;
$b = 3;
which would give you an undefined variable error.
Instead, it's parsed as:
$b = 3;
$a = $b;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With