Closed baptistepillot closed 9 years ago
Wan't a "php patch" for this ? This code, begining all my scripts, removes automatically the renamed function but you will never have any error for already existing functions : they will be replaced !
if (function_exists('_runkit_function_rename')) {
runkit_function_remove('_runkit_function_rename');
}
runkit_function_rename('runkit_function_rename', '_runkit_function_rename');
runkit_function_add(
'runkit_function_rename', '$function_name, $new_name',
'
if (function_exists($new_name)) {
runkit_function_remove($new_name);
}
return _runkit_function_rename($function_name, $new_name);
'
);
Fixed
If I refresh the page executing this script quickly (less than 5 seconds, as apache can use the same process for the next script execution than the previous one) :
It looks like php kept in its memory the _chop function, that keep working well ! This is done with internal functions only. Php defined functions work well.
Tested and reproduced on several computers under xubuntu 13.10 using PHP 5.5.3, installed as an apache module (common use).
And you can make an
runkit_method_delete('_chop')
if you want : it will not be here for the current script, but will come back on the next execution using the same process !I don't want to run php-cgi, sorry :)