note 72457 added to function.error-reporting

From: Date: Fri, 19 Jan 2007 11:43:51 +0000
Subject: note 72457 added to function.error-reporting
Groups: php.notes 
Request: Send a blank email to php-notes+get-121919@lists.php.net to get a copy of this message
error_reporting() may give unexpected results if the @ error suppression directive is used. <?php @include 'config.php'; include 'foo.bar'; // non-existent file ?> config.php <?php error_reporting(0); ?> will throw an error level E_WARNING in relation to the non-existent file (depending of course on your configuration settings). If the suppressor is removed, this works as expected. Alternatively using ini_set('display_errors', 0) in config.php will achieve the same result. This is contrary to the note above which says that the two instructions are equivalent. ---- Server IP: 193.95.141.37 Probable Submitter: 84.203.47.19 ---- Manual Page -- http://www.php.net/manual/en/function.error-reporting.php Edit -- https://master.php.net/note/edit/72457 Del: integrated -- https://master.php.net/note/delete/72457/integrated Del: useless -- https://master.php.net/note/delete/72457/useless Del: bad code -- https://master.php.net/note/delete/72457/bad+code Del: spam -- https://master.php.net/note/delete/72457/spam Del: non-english -- https://master.php.net/note/delete/72457/non-english Del: in docs -- https://master.php.net/note/delete/72457/in+docs Del: other reasons-- https://master.php.net/note/delete/72457 Reject -- https://master.php.net/note/reject/72457 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#121919) next »