Redefine Native Functions¶
It is possible to redefine PHP functions or constants, or even any defined of such, by using the use command.
This feature is interesting for testing purposes: it allows the replacement of a defined function with an alternative.
It is not possible to do this twice in the same file, nor to redefine classes.
See Also¶
Redefining native PHP functions [Try me]