<?php
uopz_backup("fgets");
uopz_function("fgets", function(){
return true;
});
var_dump(fgets());
uopz_restore('fgets');
fgets();
?>
The above example will output
something similar to:
Warning: fgets() expects at least 1 parameter, 0 given in /path/to/script.php on line 8