PHP newbie question

From: Date: Wed, 10 Jan 2001 04:55:43 +0000
Subject: PHP newbie question
Groups: php.general 
Request: Send a blank email to php-general+get-33619@lists.php.net to get a copy of this message
Hello, I have a question regarding the following 3 one line .php files: <?php if (! isset($a)) print "Hello, World!"; // script 1 ?> <?php if (! $a) print "Hello, World!"; // script 2 ?> <?php if (! ) print "Hello, World!"; // script 3 ?> The first script prints the famous words correctly but what baffles me is the second script which should be the same as the third script since $a is not set and hence should evaluate to nothing, but PHP 3.0.15 is evaluating ! $a to true instead of giving me a syntax error as in script 3. Can someone explain why this is? Does this make the isset() built in function redundant in general? Thanks, Neil

« previous php.general (#33619) next »