note 128250 added to function.set-error-handler

From: Date: Sat, 25 Feb 2023 10:20:35 +0000
Subject: note 128250 added to function.set-error-handler
Groups: php.notes 
Request: Send a blank email to php-notes+get-220207@lists.php.net to get a copy of this message
A simple error handler that makes errors far more visible: // // Set the error handler to one that prints out more // visible errors // set_error_handler(function ($errno, $errstr) { $str = '<div style="margin: 20px; background-color: #fdd; border: 3px solid red; padding: 10px; border-radius: 15px; line-height: 25px"><b>Error: </b>%s (error level: %s)</div>'; printf($str, $errstr, $errno); }); ---- Server IP: 45.112.84.4 Probable Submitter: 80.90.13.130 (proxied: 86.31.104.45) ---- Manual Page -- https://php.net/manual/en/function.set-error-handler.php Edit -- https://main.php.net/note/edit/128250 Del: integrated -- https://main.php.net/note/delete/128250/integrated Del: useless -- https://main.php.net/note/delete/128250/useless Del: bad code -- https://main.php.net/note/delete/128250/bad+code Del: spam -- https://main.php.net/note/delete/128250/spam Del: non-english -- https://main.php.net/note/delete/128250/non-english Del: in docs -- https://main.php.net/note/delete/128250/in+docs Del: other reasons-- https://main.php.net/note/delete/128250 Reject -- https://main.php.net/note/reject/128250 Search -- https://main.php.net/manage/user-notes.php

« previous php.notes (#220207) next »