note 96972 deleted from function.is-string by danbrown

From: Date: Thu, 25 Mar 2010 15:47:01 +0000
Subject: note 96972 deleted from function.is-string by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-167393@lists.php.net to get a copy of this message
Note Submitter: chris AT cmbuckley DOT co DOT uk ---- To son9ne dot junk at gmail dot com: You're switching on $var, not on true, which would make your code return 'string' as expected (try is_string('')). Switch makes a loose comparison between the condition and the case. In your code, $var === '' and is_array($var) === false, and false == ''.

« previous php.notes (#167393) next »