note 55466 deleted from language.types.null by danbrown

From: Date: Tue, 19 May 2009 14:20:21 +0000
Subject: note 55466 deleted from language.types.null by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-155738@lists.php.net to get a copy of this message
Note Submitter: getphp at gmx dot net ---- in addition to poutri_j at epitech dot net: you missed that ($var == null) dont respect the type ... try this: <?php $t = array(); if ($t === NULL OR is_null($t)) { echo "Value is NULL"; } elseif ($t === TRUE) { echo "Value is TRUE"; } elseif ($t == NULL OR empty($t)) { echo "Value not set or empty."; } ?> Output: Value maybe not set or empty. PS: Yes, some conditions are redundant. This was intended.

« previous php.notes (#155738) next »