note 83901 deleted from function.strrpos by mazzanet

From: Date: Sun, 25 Dec 2011 00:47:31 +0000
Subject: note 83901 deleted from function.strrpos by mazzanet
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-185235@lists.php.net to get a copy of this message
Note Submitter: dubayou [ot] g.com ---- not all code is the same. it should be coded such as <?php $a = "abcd"; if(is_bool(strrpos($a,"a"))) echo "Bad"; else echo "Good"; Gives: Good This is how you might expect it to work, but it will fail; <? $a = "abcd"; if(!strrpos($a,"a")) echo "Bad"; else echo "Good"; Gives: Bad

« previous php.notes (#185235) next »