note 96196 deleted from function.isset by danbrown

From: Date: Sun, 14 Feb 2010 04:57:23 +0000
Subject: note 96196 deleted from function.isset by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-165946@lists.php.net to get a copy of this message
Note Submitter: wes at arasian dot com ---- "yarco" stated that: <?php $string = "test"; isset($string['aaaaa']); ?> would return true, when it shouldn't. Actually this is CORRECT behavior, because realize that 'aaaaa' evaluates as 0 numerically, and $string[0] is, indeed, set. To find whether a string exists within a string, use strpos() instead.

« previous php.notes (#165946) next »