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