Re: Re[2]: Is echo tag reasonably portable?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hiyah Richard,

On 11/15/05, Richard Davey <rich@xxxxxxxxxxxxx> wrote:
> Hi Robin,
>
> Tuesday, November 15, 2005, 6:18:06 PM, you wrote:
>
> > Short tags have been deprecated for years. Both the manual and the
> > php.ini file itself advise people not to use them. Personally I
> > think it's about time they were turned off by default, but that's
> > bound to annoy a lot of people who've ignored the warnings.
>
> 1) They are not deprecated.

Granted, deprecated might be putting it a little strong. They are
certainly not encouraged.

I did quote the note concerning them in its entirety. If I had simply
quoted the manual as saying "be sure not to use short tags" then I
could see your point regarding lack of context. But I didn't.

Similarly, what I quoted was the entire text of the php.ini comment.
Short of including the entire php.ini file, I don't see how much more
context I could possibly give.

> I doubt very much if they will be disabled. They are perfectly valid
> SGML processing instructions.

Firstly, I didn't actually suggest they were disabled. I suggested
that they should be off by default. If they're needed then it's simple
to turn them on, but it would discourage new developers from using a
construct which is not compatible with xml and xhtml.

Now I can't argue that it's not valid sgml as I'm not overly familiar
with the sgml standard (in fact I don't recall mentioning sgml at
all), but it's certainly not valid xml or xhtml.

A '<?' must be followed by a processing instruction target, so if you
have php using short tags embedded in an xml document, then the source
is very unlikely to validate.

Also, if you parse an xml document with php with short tags turned on
- php will try to handle every processing instruction, even
instructions for which it is not the target.

This is likely to become more of an issue, not less as xhtml support
in browsers grows.

> I agree they are a legacy of the PHP3 era, and for re-distributable
> apps you should avoid them. But that is all. Your statements are, in
> their brevity, incorrect.

I would dispute that. In fact, I just have.

  -robin

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux