note 110464 rejected from function.strpos by daverandom
| From: | daverandom@php.net | Date: | Tue, 22 Jul 2014 15:35:24 +0000 |
| Subject: | note 110464 rejected from function.strpos by daverandom | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-200026@lists.php.net to get a copy of this message | ||
Note Submitter: Aleksey Korzun
----
Just a quick note, if by some chance you pass an array to strpos function you might have unexpected
behaviour.
<?php
$foobar = array();
if(strpos($foobar, 'something') !== false) {
}
?>
The above condition will actually pass and execute your code.