note 55035 modified in function.error-reporting by danbrown

From: Date: Fri, 24 Oct 2008 18:37:47 +0000
Subject: note 55035 modified in function.error-reporting by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-145708@lists.php.net to get a copy of this message
Remember that the error_reporting value is an integer, not a string ie "E_ALL & ~E_NOTICE". This is very useful to remember when setting error_reporting levels in httpd.conf: Use the table above or: <?php ini_set("error_reporting", E_YOUR_ERROR_LEVEL); echo ini_get("error_reporting"); ?> To get the appropriate integer for your error-level. Then use: php_admin_value error_reporting YOUR_INT in httpd.conf I want to share this rather straightforward tip as it is rather annoying for new php users trying to understand why things are not working when the error-level is set to (int) "E_ALL" = 0... Maybe the PHP-developers should make ie error_reporting("E_ALL"); output a E_NOTICE informative message about the mistake? --was-- Remember that the error_reporting value is an integer, not a string ie "E_ALL & ~E_NOTICE". This is very useful to remember when setting error_reporting levels in httpd.conf: Use the table above or: <? ini_set("error_reporting", E_YOUR_ERROR_LEVEL); echo ini_get("error_reporting"); ?> To get the appropriate integer for your error-level. Then use: php_admin_value error_reporting YOUR_INT in httpd.conf I want to share this rather straightforward tip as it is rather annoying for new php users trying to understand why things are not working when the error-level is set to (int) "E_ALL" = 0... Maybe the PHP-developers should make ie error_reporting("E_ALL"); output a E_NOTICE informative message about the mistake? http://php.net/manual/en/function.error-reporting.php

« previous php.notes (#145708) next »