note 70127 added to function.error-reporting
| From: | silvan at NOSPAM dot example dot com | Date: | Wed, 04 Oct 2006 13:40:50 +0000 |
| Subject: | note 70127 added to function.error-reporting | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-118024@lists.php.net to get a copy of this message | ||
On a shared debugging and production server it is convenient to use
<?php error_reporting(E_ALL); ?>
for debugging.
This will not help in case of parsing errors, so make sure you enable at least E_PARSE in your
php.ini. Parse errors should not exist in production scripts.
Still, sometimes your script will not get executed even though no parse error is displayed (just a
blank page/ no output at all). As far as I know this only happens when you redeclare a user function
or class.
eg.
<?php
error_reporting(E_ALL);
function a(){}
function a(){}
?>
This prevents your script from running like a parse error, but is in fact a fatal run-time error
(E_ERROR). Other fatal run-time errors will allow your script to apply the error_reporting, when it
is executed before the
error occurs (eg. put error_reporting on the first line of code.)
----
Server IP: 83.137.20.120
Probable Submitter: 84.35.64.63
----
Manual Page -- http://www.php.net/manual/en/function.error-reporting.php
Edit -- https://master.php.net/note/edit/70127
Del: integrated -- https://master.php.net/note/delete/70127/integrated
Del: useless -- https://master.php.net/note/delete/70127/useless
Del: bad code -- https://master.php.net/note/delete/70127/bad+code
Del: spam -- https://master.php.net/note/delete/70127/spam
Del: non-english -- https://master.php.net/note/delete/70127/non-english
Del: in docs -- https://master.php.net/note/delete/70127/in+docs
Del: other reasons-- https://master.php.net/note/delete/70127
Reject -- https://master.php.net/note/reject/70127
Search -- https://master.php.net/manage/user-notes.php