Re: short_open_tags
| From: | Andrew Faulds | Date: | Sat, 21 Jul 2012 08:00:09 +0000 |
| Subject: | Re: short_open_tags | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-61603@lists.php.net to get a copy of this message | ||
I also think <? is good. Consider:
<? if (user.loggedin) ?>
<a href=/logout>Logout</a>
<? elseif ?>
<? href=/login>Log in</a> | <a href=/register>Register</a>
<? endif ?>
With <?php, it's less readable (it's not so bad, but I certainly prefer the
former.)
<?php if (user.loggedin) ?>
<a href=/logout>Logout</a>
<?php elseif ?>
<a href=/login>Log in</a> | <a href=/register>Register</a>
<?php endif ?>
On Jul 21, 2012 8:03 AM, "Lester Caine" <lester@lsces.co.uk> wrote:
> Rick Bird wrote:
>
>> My name is Rick.. I done some light work on documentation side of
>> things,
>> but I had a question because I've been working a lot with the Symfony
>> framework lately. Some in the Symfony irc room seem to be under the
>> impression that short_open_tags is to be deprecated in php6. Is there any
>> weight to this? I personally have found short tags a great tool, and
>> simplifies a lot of things. In cases where there is the alternative
>> syntax
>> being used (great when working with php templates), <? If( $you == $them):
>> ?>. I understand the biggest reason to discourage short tags is for xml.
>>
>
> Now that <?= has been properly separated from <? some of the 'pressure'
> has been removed. Any attempt to remove <?= WOULD be strongly opposed, but
> I am in total agreement with you on <? for exactly the same reason. Simple
> templating systems don't need anything more and adding <?php everywhere
> does make these a lot more difficult to read. To my mind this is what PHP
> is all about, and killing things just because they don't conform with the
> 'perfect programming language' is irritating. Perhaps another example where
> two versions of PHP might actually be a sensible split?
>
> --
> Lester Caine - G8HFL
> -----------------------------
> Contact -
> http://lsces.co.uk/wiki/?page=**contact<http://lsces.co.uk/wiki/?page=contact>
> L.S.Caine Electronic Services - http://lsces.co.uk
> EnquirySolve - http://enquirysolve.com/
> Model Engineers Digital Workshop - http://medw.co.uk
> Rainbow Digital Media -
> http://rainbowdigitalmedia.co.**uk<http://rainbowdigitalmedia.co.uk>
>
>
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>