_var = $var; } function warning() { printf('%d'); } function notice() { if ($this->_not_set) print '$this->_not_set is TRUE.
'; else return FALSE; } function error() { trigger_error('simple example welcomes here for errors.', E_USER_ERROR); } } /* $error->report_layout('LOGGING', MULTI_LOG, array(FILE_LOG => 'error.log', MAIL_LOG => 'gerzson@localhost')); */ $error->report_layout('REPORT', 0, 'SOURCE'); # no source report $error->report_layout('CONTEXT', 'nostrict', 1); # full context report $a = new bugs('this variable is set'); $a->notice(); $error->report_layout('CONTEXT', 'nostrict', 2); # full context report $a->warning(); $error->report_layout('REPORT',E_ERROR_ALL,'SOURCE'); $error->report_layout('CONTEXT', 'strict', 2); # strict context report $a->error(); $error->report_layout('CONTEXT', 'nostrict', 10); # full context report include('no such file.'); /* the following function-call causes error which can not be hanlded by ErrorHandler(), but you can still play with SILENT REPORT and LOG REPORT. */ # above you can see that multiline /* */ comments may still cause problems. no_such_function(); ?>