echo is not really a function, it is a language construct, so you do not need 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.
Since 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 can be used in this context.
source share