Jump to content

Rename all function references


madk

Recommended Posts

Hello,

 

I'm got a client running some code that contains a function called date_format. We are porting over to PHP 5 and now PHP5 has it's own date_format function.  I am looking for a script that will parse all php files and rename any references to the function call.

 

Just wondering if anyone has an code I could look at so I don't recreate the wheel.

 

Thanks in advance.

Link to comment
https://forums.phpfreaks.com/topic/149249-rename-all-function-references/
Share on other sites

Are the changes going to be made on linux or windows?

 

With Linux you can just use the "sed" command.  Works great with regular expressions.

 

With windows there are find/replace programs that may be suitable.  Or you can use Cygwin, which should support the "sed" command.

 

Good luck!

Are the changes going to be made on linux or windows?

 

With Linux you can just use the "sed" command.  Works great with regular expressions.

 

With windows there are find/replace programs that may be suitable.  Or you can use Cygwin, which should support the "sed" command.

 

Good luck!

 

It'll be on Linux but I have to deploy it across about 15 sites on separate servers, which is why I'm looking for a script that I can just call easily. I'll look into the sed command.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.