Re: RFC Posted for str_begins and str_ends functions

From: Date: Wed, 03 Aug 2016 09:23:03 +0000
Subject: Re: RFC Posted for str_begins and str_ends functions
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-94814@lists.php.net to get a copy of this message
On 03.08.2016 at 09:59, Lauri Kenttä wrote: > I only saw you mention strpos, preg_match and substr as (slower) > alternatives. However, there's already a function called substr_compare > which is meant for just this kind of comparisons but which is more > general than your RFC. Thanks for pointing out substr_compare(), of which I even have not been aware of. And indeed, substr_compare() is perfectly suitable to verify whether a string starts or ends with a certain substring, so, in my opinion, there is no need for the other functions to be added to ext/standard. -- Christoph M. Becker

« previous php.internals (#94814) next »