Philip Olson wrote:

It's also worth mentioning the following historical commit:

  the 'alternative' syntax is not deprecated
  Tue Oct 9 23:29:27 2001 UTC (5 years, 3 months ago) by jimw

  <sect1 id="control-structures.alternative-syntax">

In other words, over five years ago the deprecated status warning was removed from the PHP manual for this alternative syntax. It had been there for ~3.5 months and according to this long thread*, adding that warning was considered a mistake.

Oh, that is good to know. I have evidently not looked at that page in the docs in over 5 years and 3 months. =)

So that means the only near official place they are "discouraged" is in the PEAR coding standards. And actually reading it sounds ambiguous.

"You are strongly encouraged to always use curly braces even in situations where they are technically optional. Having them increases readability and decreases the likelihood of logic errors being introduced when new lines are added."

I think that refers to syntax like:

if($var==1)
    do_something();

So, I guess we can close this discussion.  Thanks for entertaining me.

--

Brian Moon
-------------
http://dealnews.com/
It's good to be cheap =)

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to