I like to use the syntax with “:” and the “end-stuff”.
if($var=='patate'):
echo 'excellent';
else :
...
endif;
I know IDE are used to the {} syntax when it’s time to collapse code, but other than that, is there any reason to NOT use this “:” syntax ?
Don’t use it. It’s ugly and people usually expect the curly-braces syntax they are used to. It’s most common when mixing PHP and HTML in the same file (i.e. when using PHP as a template engine) – but you shouldn’t do that anyway, at least not if the same file also contains your application logic.
Autoindent scripts will also have trouble indenting your code properly since they usually just know one curly brace = one more/less level of indentation.
However, if you do like
:instead of{have a look at python. 🙂