Re: dropping asp_tags in HEAD
| From: | Edin Kadribasic | Date: | Sat, 14 Apr 2007 17:02:06 +0000 |
| Subject: | Re: dropping asp_tags in HEAD | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-28824@lists.php.net to get a copy of this message | ||
On Apr 14, 2007, at 6:51 PM, Nicolas A. Bérard-Nault wrote:
Maybe I'm missing something here, but why should PHP be compliant with a standard that absolutely has nothing to do with the language (c.f.: XML) ? Isn't it obvious that a file with the extension .php is NOT an XML file ? It seems to me the short tags issue is starting to become a bikeshed argument... Again, sorry if I'm missing the point.Say you want PHP to produce XML output in a template like fashion: <?xml ...> <user> <name><%= $username %></name> <zip><%= $zip %></zip> </user> Now to me personally this looks very neat and allows for code/presentation separation, in this case presentation being XML output. You cannot do this with short tags enabled because PHP will throw a parse error on line one. So you have two options: enable asp tags and use it as above, or use: <name><?php echo $username?></name> syntax. It comes down to taste, and to my eye the version with asp tags looks more readable when you use PHP in this way. Edin