note 3572 modified in error_reporting by zak

From: Date: Sat, 16 Dec 2000 16:49:59 +0000
Subject: note 3572 modified in error_reporting by zak
Groups: php.notes 
Request: Send a blank email to php-notes+get-8786@lists.php.net to get a copy of this message
The E_NOTICE error reporting level reports the use of undefined variables as an error. For example: error_level (E_ALL); # Set error reporting to highest level if ($foo) # This will generate an error print "bar"; # because $foo is not defined To avoid this behavior, use isset to test if the given variable has been defined. For example: error_level (E_ALL); if (isset ($foo)) print "bar"; http://www.php.net/manual/function.error-reporting.php

« previous php.notes (#8786) next »