note 121879 added to function.stristr
| From: | angelaseise3 at gmail dot com | Date: | Fri, 17 Nov 2017 14:56:24 +0000 |
| Subject: | note 121879 added to function.stristr | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-209167@lists.php.net to get a copy of this message | ||
Make sure to put extra parentheses around the stristr function, so that it evaluates before checking
its value.
if ((stristr($haystack, $needle)) !== false) {
do stuff;
}
----
Server IP: 208.43.231.9
Probable Submitter: 66.49.122.18
----
Manual Page -- http://php.net/manual/en/function.stristr.php
Edit -- https://master.php.net/note/edit/121879
Del: integrated -- https://master.php.net/note/delete/121879/integrated
Del: useless -- https://master.php.net/note/delete/121879/useless
Del: bad code -- https://master.php.net/note/delete/121879/bad+code
Del: spam -- https://master.php.net/note/delete/121879/spam
Del: non-english -- https://master.php.net/note/delete/121879/non-english
Del: in docs -- https://master.php.net/note/delete/121879/in+docs
Del: other reasons-- https://master.php.net/note/delete/121879
Reject -- https://master.php.net/note/reject/121879
Search -- https://master.php.net/manage/user-notes.php