Re: dropping asp_tags in HEAD

From: Date: Sat, 14 Apr 2007 16:51:12 +0000
Subject: Re: dropping asp_tags in HEAD
References: 1 2 3 4 5 6 7 8 9 10  Groups: php.internals 
Request: Send a blank email to internals+get-28820@lists.php.net to get a copy of this message
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. On 4/14/07, Bart de Boer <bart@mediawave.nl> wrote:
I feel I can't disagree with my hero. :) But is that really so? The XML spec says: PI ::= '<?' PITarget (S (Char* - (Char* '?>' Char*)))? '?>' Doesn't Char* mean any char? All the parsers seem to accept '>' inside PI's without problems too. Furthermore... PHP may not be the most beautiful of languages... But that doesn't mean it has to be ugly... -Bart Rasmus Lerdorf wrote: PHP was never meant to win any beauty contests, nor to enforce standards. If you want to take your argument to its logical conclusion then you have to also take the next step and not allow literal entities inside the PHP blocks, because that is also not standards compliant. That means you cannot write: <?php if($a > 10) foo() ?> You would have to change it to: <?php if($a &gt; 10) foo() ?> And that's just a simple example of that. -Rasmus Bart de Boer wrote:
And let me stress that this is something we're *forcing* people to do when they're on a short tags enabled server... It's not something they're allowed to do at free will... PHP's convention is currently responsible for people creating non-standards-compliant documents...
And
I think we should take that responsibility and clean up the mess we made... The XML spec is outside our scope... What's inside <?php tags
is
our business... Tijnema ! wrote:
On 4/14/07, Bart de Boer <bart@mediawave.nl> wrote:
I think ASP tags should go too... Simply because it's not standards compliant and I think it's good if people are forced to make nice standards compliant documents... I'd even go so far as to favor
dropping
short tags too... <? echo "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n"; ?> What a mess!...
What about the even shorter version: <?="<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n"; ?> That's real ugly code... Tijnema
Guilherme Blanco wrote:
I really can't see a reason to mantain ASP tags. Ok, short tags is good because of <?=$something?>, but it doesn't behavior well with XML documents. So, if your intention is to change short tags to ASP tag in a near future, ok. ASP tags does not mix
XML
documents. Otherwise, ASP tags is the most useless thing I've ever heard in PHP sphere. I really don't know why wasn't it dropped in PHP5. That's what I think... IMHO. []s, On 4/13/07, Tijnema ! <tijnema@gmail.com> wrote:
On 4/13/07, Richard Lynch <ceo@l-i-e.com> wrote:
On Fri, April 13, 2007 9:16 am, Tijnema ! wrote:
I don't see why you are all against dropping the ASP tags. I see people using ASP & PHP in one script, what would that do? If
ASP runs
first then there isn't a problem, but if PHP runs first, it would execute the ASP code.
There are actually people running both PHP and ASP in series to generate HTML? If they are, they can turn ASP tags *OFF* in php.ini And they certainly aren't going to be distributing that setup
outside
their own little world...
I've seen such code on the net some time ago... But should you distribute PHP code with ASP tags? That's not good either i think. So there's no use of the ASP tags, and they can
only
interfere with ASP. Tijnema -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
-- Nicolas Bérard-Nault (nicobn@gmail.com) Étudiant D.E.C. Sciences, Lettres & Arts Cégep de Sherbrooke Page personnelle: http://nicobn.googlepages.com

« previous php.internals (#28820) next »