Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function uopz_rescue_php()
- {
- $search = uopz_copy('array_search');
- uopz_function('array_search', function($haystack, $needle, $strict = false)
- use ($search) {
- return $search($needle, $haystack, $strict);
- });
- /** and so on **/
- }
- function uopz_restore_php()
- {
- uopz_restore('array_search');
- /** and so on **/
- }
- uopz_rescue_php();
- $array = ["apples", "oranges", "pears"];
- var_dump(array_search($array, "pears"));
- uopz_restore_php();
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement