Following my belated understanding of the @
I was now using the {} could somebody point me to the reference to these in the manual? As i find it hard to fully understand what exactly they are doing.
(I am trying to improve my PHP understanding)
I currently believe they make PHP process the code between the braces before the rest of the code? or something like that... I might be totally wrong.
Of course I am used to using them in if, functions, classes etc.
but Ive started to make use of them in things like
$class->{$functionname}();
and
$html = <<< ENDIT
myname is {$this->name}
blah blah blah
blah blayh blah
ENDIT;
However, why cant i do something like...
$html = <<< ENDIT
the date is {date("d/n/y")}
ENDIT;
Thanks in advance for clearing up the curly brackets/braces or whatever you like to call em 😛
do they have a technical name in PHP?
also any comments on the examples i wrote would be good, i don't know if any of them in particular are considered back or good practice?