Re: Adding a more logical string slicing function to PHP

From: Date: Thu, 31 Mar 2011 16:19:32 +0000
Subject: Re: Adding a more logical string slicing function to PHP
References: 1 2 3 4 5 6 7 8 9 10 11  Groups: php.internals 
Request: Send a blank email to internals+get-51774@lists.php.net to get a copy of this message
On 31 March 2011 16:43, Brian Moon <brian@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 > >

« previous php.internals (#51774) next »