My main worry with such a hack would be breaking a script like this:

  <?php
    function xml() {
        echo "Hello World";
    }
  ?>
  ...
  <?xml ()?>
  ...

Now, people generally don't put spaces between the function name and the
(), but it is a BC concern since the above script works just fine today.

One idea would be to only strip <?xml tags up until we see the first PHP
tag.  That should cover most cases, but it may be a bit too magical.

-Rasmus

On Thu, 17 Oct 2002, Andrei Zmievski wrote:

> They are _not_ the same person!
>
> On Thu, 17 Oct 2002, Zeev Suraski wrote:
> > Well, I differ with you on that.  I don't think there's anything in the
> > same class as <?xml.
> >
> > Zeev
> >
> > At 18:08 17/10/2002, Andi Gutmans wrote:
> > >I don't think we should add special hacks to the scanner. Soon we're going
> > >to have a zillion hacks for other XML/SGML/foobar documents.
> > >
> > >Andi
> > >
> > >At 12:17 PM 10/16/2002 -0400, Ilia A. wrote:
> > >>Since the general consensus by the developers is not to remove the
> > >>short_tags
> > >>or even disable them. Perhaps we should consider alternate solutions to
> > >>this
> > >>problem. Given the buzzword popularity of XML and its slowly growing
> > >>popularity among website designers (XHTML) this issue is likely to come
> > >>up in
> > >>the future yet again.
> > >>The solution I would like to offer, is a patch that adds special handling
> > >>for
> > >><?xml. Thus preventing the language parser from attempting to parse data
> > >>inside <?xml as PHP source.
> > >>
> > >>Ilia
> >
> >
> > --
> > PHP Development Mailing List <http://www.php.net/>
> > To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
> -Andrei                                       http://www.gravitonic.com/
>
> "Claiming Java is easier than C++ is like
>  saying that K2 is shorter than Everest."
>  -- Larry O'Brien (editor, Software Development)
>
> --
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, visit: http://www.php.net/unsub.php
>


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to