Just wondering.
Thanks.
And I'm just putting this so I can reach the 30 characters, ignore this bit :)
Just wondering.
Thanks.
And I'm just putting this so I can reach the 30 characters, ignore this bit :)
Because they are PHP structures (called also constructs) not functions
echo is not actually a function it is a language construct, so you are not required to use parentheses with it. echo unlike some other language constructs does not behave like a function, so it cannot always be used in the context of a function.
Because echo does not behave like a function, the following code is invalid.
($some_var) ? echo 'true' : echo 'false';
However, the following examples will work:
($some_var) ? print 'true' : print 'false';
print is also a construct, but it behaves like a function, so it may be used in this context.