note 90972 deleted from function.stripos by danbrown

From: Date: Tue, 19 May 2009 11:47:15 +0000
Subject: note 90972 deleted from function.stripos by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-155720@lists.php.net to get a copy of this message
Note Submitter: Anteaus ---- Re the warning, it is perhaps worth clarifying that the === operator cannot be used to test for a true condition,because an integer return is not literally a Boolean true. '!==false' is the only valid form of a test for 'found anywhere.' This issue also affects straight logical tests such as if(stripos($str1,$str2)) -which return anomalous results when $str1==$str2. Indexing strings from one removes all of these anomalies, but no doubt the academics will rail against such a suggestion.

« previous php.notes (#155720) next »