PHP Tip: When to use the alternative syntax

I use PHP shorthand syntax all the time when working with html templates with embedded PHP. I find the syntax much cleaner then having a bunch of closing brackets in my WordPress or Laravel template files. I came across a tweet the other day from @csswizardry regarding his negative view on the PHP shorhand sytax.

While I disagree with his statement, I do believe that people have used the alternative syntax in the wrong context before. Ben Everard has put together a quick tip video showing when you should be using the alternative syntax.

Leave a Reply

Your email address will not be published.