Re: Anyone have a tool/script to convert <? to <?php (but not <?=)

From: Date: Fri, 14 Feb 2014 20:38:37 +0000
Subject: Re: Anyone have a tool/script to convert <? to <?php (but not <?=)
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-322879@lists.php.net to get a copy of this message
Daevid Vincent wrote:
<?echo 'i told you so';?> <?phpecho 'this one fails';?>
I've had a lot of legacy code to convert. Since I had no plans to remove the '<?= ' ... I always have the space after that! ... then '<? echo' got conveyed to '<?= ' If you have '<?echo' then that can be converted as well so '<?phpecho ' also becomes '<?= ' ? I've been using eclipse with phpeclipse for a long time now, and global search and replace is one of the best facilities it provides. I can search, establish how many occurrences of a string appear, and then decide how to convert that string. When you only have half a dozen results it's often faster simply to edit each thahn work out what to put in the global replace :) -- Lester Caine - G8HFL ----------------------------- Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk

« previous php.general (#322879) next »