note 52155 deleted from function.strstr by betz

From: Date: Sat, 12 Nov 2005 08:37:11 +0000
Subject: note 52155 deleted from function.strstr by betz
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-98462@lists.php.net to get a copy of this message
Note Submitter: ---- Regarding the note left by nicolas at bougues dot net on 26-Sep-2002 11:53, where he stated > The following expression > > strstr ("0", "0") == FALSE > > is TRUE, which is obviously not what one's want when comparing to FALSE. > > If you just want to know iff haystack contains needle, without such ambiguity, use is_string > (strstr ("0", "0")), which will evaluate to TRUE. Use the === operator instead. Thus, str ("0", "0") === FALSE if FALSE as expected.

« previous php.notes (#98462) next »