null / unset / isset ?

From: Date: Thu, 08 Apr 2004 18:05:59 +0000
Subject: null / unset / isset ?
Groups: php.internals 
Request: Send a blank email to internals+get-9010@lists.php.net to get a copy of this message
consider this if you will: <? echo <<< ___THEEND EXPECT: isset(): true; is_null(): true; REALITY: ___THEEND; $varIsSet = null; var_dump( isset($varIsSet) ); var_dump( is_null($varIsSet) ); ?> I would have thought that having set the variable to something even if its 'nothing' would mean it is set in the current variable scope. either that or it makes unset() redundant, no? and the PHP documentation leaves me with the impression that is_null() works with 'set' variables (and would give an E_NOTICE if an unset variable is set) is there a difference between null and unset()ing? does a variable that is null take up no memory (rather like variable that have never been defined or removed completely) apologies if this is misplaced. rgds, Jochem

« previous php.internals (#9010) next »