note 51060 deleted from function.stristr by danbrown
| From: | danbrown@php.net | Date: | Fri, 28 Nov 2008 20:08:37 +0000 |
| Subject: | note 51060 deleted from function.stristr by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-147181@lists.php.net to get a copy of this message | ||
Note Submitter: stoyan at mail dot ebpw dot net
----
Be careful never to use integer value as a needle - always convert it to string before use e.g.
using strval() - otherwise you'll get messed up - for example te following:
if ($res=stristr('40', 52)) echo $res;
will return '40' as $res - simply 52 is the ASCII code of '4' that's in the
beginning of our string.
Actually that's covered in the description of the function but you may miss to pay attention to
it just like me=]