note 49959 deleted from function.is-bool by nlopess

From: Date: Wed, 02 Mar 2005 18:44:44 +0000
Subject: note 49959 deleted from function.is-bool by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-85812@lists.php.net to get a copy of this message
Note Submitter: punkpuke at comcast dot net ---- I think it's good to point out that is_bool() is the exact opposite of empty() and that is_bool() will return false if the variable it is checking is one of the following... $x = ""; $x = null; var $x; (not set) $x = array(); $x = false; $x = "0"; $x = (int) 0; Empty returns true for all of those. It's useful instead of typing !empty() and worrying.

« previous php.notes (#85812) next »