note 77978 deleted from function.isset by googleguy

From: Date: Sat, 19 Jan 2013 03:54:19 +0000
Subject: note 77978 deleted from function.isset by googleguy
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-193265@lists.php.net to get a copy of this message
Note Submitter: phpnotes dot 20 dot zsh at spamgourmet dot com ---- Note that isset is lazy -- the first undefined variable causes it to return. Have a look at this example: <?php class Foo { public function __isset($varname) { echo "ZOMG! isset was called on my $varname!\n"; } } $foo = new Foo; // bar will never get checked var_dump(isset($foo->foo, $foo->bar)); // Output: // ZOMG! isset was called on my foo! // bool(false) ?>

« previous php.notes (#193265) next »