To change the error reporting level to something different, pass the new level as the parameter. The value return from the function call is the old error reporting level. The following example changes the error reporting level to everything but notices and stores the old level in a variable.
This final example removes E_NOTICE from the current reporting level, runs some other code, and then restores the old level back again.
which is to be expected: 6143 is E_ALL and 6135 is E_ALL without E_NOTICE.