Both these syntaxes are correct and equivalent:With brackets:foreach ($listOfThings as $thing) {  echo $thing;}Without brackets:foreach ($listOfThings as $thing):  echo $thing;endforeach;Two questions come up in mind:Is there any real difference between them or are they totally identical (performence, for example)?Is it better always to use the same one or to use both, depending of some context (for example: to recognize easely the code concerning the framework).I suspect all that to be a matter of taste and company standards, but I'm not sure of that.
PHP: brackets or no brackets with if/for/while/...?
php;coding style
You should always use brackets. You'll run across code (and even some frameworks!) that do no-brackets on short loops or ifs but when it comes down to it, there is no better way to make your code confusing and hard to read than by leaving off the brackets. There's also no significant performance hit either way, so far as I know.Those two extra keys can mean a world of difference to somebody reading your code.