On 31.03.11 17:05, Rasmus Lerdorf wrote: > On 03/31/2011 07:41 AM, Philip Olson wrote: >> On Mar 30, 2011, at 1:42 PM, Martin Jansen wrote: >>> I recently got around to merge them into a largely unfinished extension >>> so they are archived somewhere safe: https://github.com/mj/php-ext-str >> >> I see str_contains() on the TODO there. I've always wanted in_string() so am >> glad to see a similar item. Using strpos() for this task feels dirty, much >> like using arrpos() for arrays would ;) > > How would str_contains() be different from strstr()?
I think my main objective was to have a utility function that has the advantages of strpos (i.e. faster and less memory usage than strstr) while having a strict boolean return value so that I don't need to remember to use === all the time. - Martin -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php