note 55466 added to language.types.null

From: Date: Thu, 04 Aug 2005 11:54:33 +0000
Subject: note 55466 added to language.types.null
Groups: php.notes 
Request: Send a blank email to php-notes+get-93062@lists.php.net to get a copy of this message
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. ---- Manual Page -- http://www.php.net/manual/en/language.types.null.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+55466 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+55466&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+55466&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+55466&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+55466&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+55466&report=yes&reason=non-english Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+55466&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+55466&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#93062) next »