John Smith
John Smith

Reputation: 6197

How to restore function overwritten by runkit_function_redefine? Halt running php process mightbe?

Its ok that I redefine a function (lets suppose fsockopen) but I have no idea how to restore it.

EDIT: Im thinking of just halting and restarting the current running PhP process, that might restore everything

Upvotes: 1

Views: 302

Answers (1)

rjdown
rjdown

Reputation: 9227

Yes, you'll need to restart. Better to use runkit_function_copy to clone the original function before you redefine it. Then you can easily restore it as needed.

Upvotes: 2

Related Questions