RE: [PHP-DEV] PHP 4.0 Bug #8139 Updated: NULL and isset

From: Date: Thu, 07 Dec 2000 10:25:56 +0000
Subject: RE: [PHP-DEV] PHP 4.0 Bug #8139 Updated: NULL and isset
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-40342@lists.php.net to get a copy of this message
> > ID: 8139 > > User Update by: richard.heyes@heyes-computing.net > > Old-Status: Feedback > > Status: Open > > Bug Type: Scripting Engine problem > > Description: NULL and isset > > > Surely if passing an unset variable by reference doesn't work as the first > guy indicated, and if the user were trying to set a mysql handle > as in your > case, they would want to be warned if it didn't work (likely they had > mis-spelled the variable). Well I was the first guy. :) I wasn't referring to passing by reference not working, but what happens afterwards when the variable that was passed in is: a. Initially unset b. Not used inside the function. After being passed by reference and unused (Admittedly a rather strange situation) the variable is of type NULL. This would suggest that it's set, and when printing the variable this seems to ring true (by not issuing a notice). But when testing with isset() it fails, contradicting what print() has just claimed. :) -- Richard Heyes

« previous php.dev (#40342) next »