For Programmers: Free Programming Magazines  


Home > Archive > PHP Language > August 2005 > Re: The Dark Side of short tags (Was: nOOb question...)









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: The Dark Side of short tags (Was: nOOb question...)
Dustin

2005-08-31, 6:55 pm

Kimmo Laine wrote:
> "ZeldorBlat" <zeldorblat@gmail.com> kirjoitti
> viestissä:1125496435.748162.26960@g14g2000cwa.googlegroups.com...
>
>
>
> They are bad, at least if you're writing (or trying to write) xhtml
> compatible code. There you need the xml declaration row <?xml version="1.0"
> encoding="UTF-8"?>. If short tags are on, and the xml declaration is in a
> php file, it's concidered as php. And since 'xml version="1.0"
> encoding="UTF-8"' makes no sense in php, it raises an error. I've done a few
> times so that I echo the xml tag , ie <?= '<?xml version="1.0"
> encoding="UTF-8"?>' ?>, but that again is bad practise. It would be better
> to leave short tags out and write proper code.
>


Well maybe xhtml standards should be more considerate of php short tag
users! ;)

--
Dustin Davis
Freelance Portal: http://www.nerdlance.com
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com