Is there any function that reverts a require/require_once/include/include_once?
For instance in script A I need to require a script B which has common functions with other script C and I don't know if previously C was required or not. So I would like to "clean" script C from memory before loading B preventing duplicated functions.
You can not - and should not do that. Instead use require_once - it will be safe for such operations. Note, that after inclusion your context will be changed - so no way to "reverse" it back could be applied.
If you want to override some functionality - you can always do that, it will work normally. And you should check things before declaring them:
function_exists() for functionsclass_exists() for classesdefined() for constantsIf you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With