Chris W wrote:

$Key = "xyz";

lots more code here.

if($key == "xyz"){

Notice: Undefined variable: key in \path\to\test.php on line X


do this stuff;
}
lots more code here;

If the language forces variable deceleration you simply get an error "variable $key not defined on line x" then there is no searching no wondering, you immediately know you made a typo, and you know exactly what line it is on.

Like that, you mean? error_reporting(E_ALL) does that for you. Of course you then turn it down when your code goes into production, though.


--
---John Holmes...

Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals – www.phparch.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to