Re: short_open_tag
| From: | Chris Newbill | Date: | Wed, 13 Dec 2000 03:39:44 +0000 |
| Subject: | Re: short_open_tag | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-41114@lists.php.net to get a copy of this message | ||
> On Wed, 13 Dec 2000, Jouni Ahto wrote:
>
> > On Tue, 12 Dec 2000, André Langhorst wrote:
> >
> > > > And then we go back to the 'what's right to do' vs.
> > > > 'what's smart to
do'
> > > > argument. I wouldn't say it's recommended, because for someone with
a
> > > > large code base is going to curse us for a few days if he tries to
move
> > > > to this 'recommended' configuration. It has nothing to do with PHP
3.0
> > > > compatibility.
> > >
> > > I have heard of scripts/apps performing global (subfolder included)
> > > search&replace... it is a matter of minutes IMHO
> >
> > perl -pi.bak -e 's/<\?\s/<?php /g'
>
> After reading the whole discussion, a small correction:
>
> perl -pi.bak -e 's/<\?\s*(?!xml\s+)/<?php /g'
>
> -- Jouni
Better rethink that regexp ;-), it won't work right for <?\n or <?php and
yes this works for <?xml
s/<\?(\s|!\s)/<?php$1/g
Chris