My prefrerence would be for the interpreter to look for "<?\w" when short tags is enabled (that was brace, question mark, white space), I don't think i've ever come across an instance when a space or line break wasn't used. I don't have a huge code repository handy but are there any good counter examples live?
It seems that checking for whitespace (or the long tag) would resolve all of the <?xml* issues, while retaining the majority of BC, and hopefully allow PHP to do what it does best, work the way developers expect it to. paul On 8/27/05, Steph <[EMAIL PROTECTED]> wrote: > Yep. I saw this happening during the PHP 5 coding contest we held last year > at Zend - some people used short open tags so I had to have that 'on' in my > php.ini to test, but having it 'on' screwed the entries that used XML, so I > was forever switching short open tags off and on. > > I was supposed to prove that there was a problem in that area, at the time, > having opened my mouth over this issue. > > <regret>I didn't actually make time to do so</regret> > > - but yes, I believe it's an issue. > > ----- Original Message ----- > From: "Sara Golemon" <[EMAIL PROTECTED]> > To: <internals@lists.php.net> > Sent: Sunday, August 28, 2005 12:02 AM > Subject: Re: [PHP-DEV] PHP 6.0 Wishlist > > > > >> It would be nice if PHP could not get tripped up by "<?xml" tags when > > >> short_tags is on. > > >> > > > Already included, you may have seen this feature used before, <?php :-) > > > > > I gather he meant making the scanner intelligent enough to see that the <? > > is followed by 'xml' and just ignoring the fact that short open tags is > on. > > I wouldn't expect to see it happen (or want it to), but if he wants it, > > here's a sloppy implementation: > > > > Index: Zend/zend_language_scanner.l > > =================================================================== > > RCS file: /repository/ZendEngine2/zend_language_scanner.l,v > > retrieving revision 1.131 > > diff -u -r1.131 zend_language_scanner.l > > --- Zend/zend_language_scanner.l 3 Aug 2005 13:30:54 -0000 > > 1.131 > > +++ Zend/zend_language_scanner.l 27 Aug 2005 21:55:36 -0000 > > @@ -1379,6 +1379,12 @@ > > } > > } > > > > +<INITIAL>"<?xml"([ \t]|{NEWLINE}) { > > + zendlval->value.str.val = (char *) estrndup(yytext, yyleng); > > + zendlval->value.str.len = yyleng; > > + zendlval->type = IS_STRING; > > + return T_INLINE_HTML; > > +} > > > > <INITIAL>"<%="|"<?=" { > > if ((yytext[1]=='%' && CG(asp_tags)) || (yytext[1]=='?' && > > CG(short_tags))) { > > > > -- > > 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 > > -- Paul Reinheimer Zend Certified Engineer -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php