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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Sent from my iPhone

> On Feb 12, 2014, at 11:43 AM, "Daevid Vincent" <daevid@xxxxxxxxxx> wrote:
> 
> Subject pretty much says it all. 
> 
> I have a lot of inherited old code where the developer used <? Instead of
> <?php everywhere. Wondering if someone has a regex or script that can go
> through these files and clean them up, of course it has to be aware of <?=
> as valid which is what makes this tricky otherwise it's a pretty simple
> search/replace.
> 
> It seems this would be a pretty useful feature to have in ZendStudio since
> it is already parsing the whole file anyways and clearly colorizes the <?
> <?php and <?= tags so it knows about them. I asked them once for this and of
> course was met with resistance. They're too focused on making Zend Framework
> than an IDE with features that would actually be beneficial to a broader
> audience, you know like actual code folding for if/then/else, switch,
> do/while, etc. or using array elements as objects with autocomplete, or
> giving us automatic magic __get and __set if defined in an inherited class
> instead of having to kludge them with @method PHPDoc tricks. But I digress.

Why is it hard for search and replace in files? Normal search for '<? ' and replace with '<?php '
-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php






[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux