jacoblukewood jacoblukewood - 9 months ago 29
PHP Question

PHP echo correct input syntax

I can't seem to find a straight up answer on this…
Lets say I want to echo "Stack Overflow FTW" to the screen. Should I use

echo ('Stack Overflow FTW');


echo 'Stack Overflow FTW';

If it doesn't really matter, which one would be the best one to get into the habit of using?


echo isn't actually a function in PHP, it's a language construct. This means that parentheses are not required and as such I would recommend not using them as they just add clutter.