Definition and usage: error_reporting (). set the php error level and return the current level. Syntax: error_reporting (report_level) if the level parameter is not specified, when
Definition and usage:Error_reporting (), set the php error level and return the current level.
Syntax:Error_reporting (report_level) if the level parameter is not specified, the current error level will be returned. The following items are possible values of level.
Disable all error reports: error_reporting (0 );
Only running errors are reported: error_reporting (e_error | e_warning | e_parse );
Report e_notice: error_reporting (e_error | e_warning | e_parse | e_notice );
Report all running errors except e_notice
This is the default value of php. ini: error_reporting (e_all ^ e_notice );
Report all php errors: error_reporting (e_all );
Similar to error_reporting (e_all), this setting also reports all php errors: ini_set ('error _ report', e_all );
- Function unserialize_handler ($ errno, $ errstr) // user-defined function
- {
- Echo "invalid serialized value. n"; // output the specified content
- }
- $ Serialized = 'foo'; // define a string
- Set_error_handler ('unserialize _ handler'); // sets the user-defined error message function.
- $ Original = unserialize ($ serialized); // Create a php value from a stored representation
- Restore_error_handler (); // restore error message pointer