You are here: Re: newbie question: <?=$variable?> yields no output « PHP Programming Language « IT news, forums, messages
Re: newbie question: <?=$variable?> yields no output

Posted by Jerry Stuckle on 09/28/07 22:34

Jeremy wrote:
> Michael Fesser wrote:
>> .oO(Jeremy)
>>
>> Good editors are able to replace '<?=' with the proper longer form
>> automatically while typing or by pressing a special hotkey.
>
> And in the unlikely event that I have to deploy to a server that doesn't
> support short tags and I can't enable them, a sed script can do the
> same. In the meantime, I don't have to read and maintain template code
> that I consider to be hideous.
>
> Look, I'm not telling YOU to use short tags. I only use them for
> templates in the first place. I'm saying it's largely a matter of style
> and people shouldn't go around imposing their coding style on others.
>
>> Short open tags are unreliable. They can be turned off on the server,
>
> So can PHP itself.
>
>> may cause trouble with XML
>
> PHP is not XML. If you're referring to XML prologue statements, it is
> just as unsafe to assume short tags is off. Putting this in a PHP
> source file:
>
> <?xml version="1.0"?>
>
> is much more likely to cause a failure on a server over which you have
> no control (and which probably has short tags enabled). This leaves the
> following option:
>

Not if the server is configured correctly (i.e. short tags off).

> <?='<?xml version="1.0"?>'?> (or, if you must, <?php echo "..."; ?>
>
> in which case the short tags problem has already been solved. Therefore,
> I contend that "proper, portable code" won't contain any unescaped XML
> prologue instructions anyway. So what's the issue?
>

Oh Gawd, what a mess.

>> might be removed entirely in upcoming versions
>
> If this ever happens, I'll buy you a case of your favorite beer. And
> half of the internet will stop working. Pretty doubtful.
>

Plan on it - it's already been announced they will do it. Just a matter
of when.

>> like all the other old crap (magic quotes, register_globals).
>
> These are completely different things that cause real security issues.
> You're comparing apples to ravenous crocodiles.
>

What do you think "deprecated" means?

>> Proper and portable code doesn't rely on them.
>
> My "improper" code works just fine, but thanks for the sentiment.

Fine for you. But you shouldn't be espousing your crap style on others.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация