note 55128 modified in language.types.null by danbrown

From: Date: Tue, 19 May 2009 14:20:42 +0000
Subject: note 55128 modified in language.types.null by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-155739@lists.php.net to get a copy of this message
if you declare something like this : <?php class toto { public $a = array(); public function load() { if ($this->a == null) // ==> the result is true $a = other_func(); } } ?> be carefull, that's strange but an empty array is considered as a null variable --was-- if you declare something like this : class toto { public $a = array(); public function load() { if ($this->a == null) // ==> the result is true $a = other_func(); } } be carefull, that's strange but an empty array is considered as a null variable http://php.net/manual/en/language.types.null.php

« previous php.notes (#155739) next »