note 93396 added to control-structures.alternative-syntax
| From: | dormam at gmail dot com | Date: | Tue, 08 Sep 2009 00:09:45 +0000 |
| Subject: | note 93396 added to control-structures.alternative-syntax | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-160290@lists.php.net to get a copy of this message | ||
@SM:
using end instead of endif/endforeach/etc. doesn't make sense in this case. The idea of
alternative syntax is to allow better templating, so indicating what kind of block is ending (by
saying endif you know you're ending an if) is a good thing. Just saying end... it's
meaningless. If you would only say end, then just use brackets.
About using BASIC's syntax, I see no need. By using endif/endwhile together, without a space,
you use a single token in a very simple way. No need to split words.
I think the alternative syntax PHP has in the present is very fitting to the intentions for
it's use.
----
Server IP: 64.71.164.2
Probable Submitter: 189.129.106.90
----
Manual Page -- http://www.php.net/manual/en/control-structures.alternative-syntax.php
Edit -- https://master.php.net/note/edit/93396
Del: integrated -- https://master.php.net/note/delete/93396/integrated
Del: useless -- https://master.php.net/note/delete/93396/useless
Del: bad code -- https://master.php.net/note/delete/93396/bad+code
Del: spam -- https://master.php.net/note/delete/93396/spam
Del: non-english -- https://master.php.net/note/delete/93396/non-english
Del: in docs -- https://master.php.net/note/delete/93396/in+docs
Del: other reasons-- https://master.php.net/note/delete/93396
Reject -- https://master.php.net/note/reject/93396
Search -- https://master.php.net/manage/user-notes.php