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


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to