On 31 March 2011 16:43, Brian Moon <br...@moonspot.net> wrote: >>> How would str_contains() be different from strstr()? >>> >>> >> They differ in the return type > > $instr = (bool)strstr($string1, $string2); > > done. No need for a new function.
God forbid anyone use (bool)strstr("something0", "0") ! > > Brian. > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php