Re: [PHP-DEV] RFC Posted for str_begins and str_ends functions

2016-08-18 Thread Lester Caine
On 18/08/16 12:39, Rowan Collins wrote: >> Is starting just a Firebird SQL thing or is it more generally available. >> I do a few google searches but as usual when searching for things like >> 'starting' one gets hundreds of pages on 'running' the software and it's >> other connotations. > > I've

Re: [PHP-DEV] RFC Posted for str_begins and str_ends functions

2016-08-18 Thread Rowan Collins
On 13/08/2016 08:42, Lester Caine wrote: Is starting just a Firebird SQL thing or is it more generally available. I do a few google searches but as usual when searching for things like 'starting' one gets hundreds of pages on 'running' the software and it's other connotations. I've never come a

Re: [PHP-DEV] RFC Posted for str_begins and str_ends functions

2016-08-13 Thread Simon Welsh
> On 14/08/2016, at 2:47 AM, w...@wkhudgins.info wrote: > > On 2016-08-13 04:34, Simon Welsh wrote: >>> On 2/08/2016, at 8:52 AM, w...@wkhudgins.info wrote: >>> Hello, >>> I recently emailed the group about submitting an RFC for str_begins() and >>> str_ends() functions. The RFC has now been offi

Re: [PHP-DEV] RFC Posted for str_begins and str_ends functions

2016-08-13 Thread will
On 2016-08-13 04:34, Simon Welsh wrote: On 2/08/2016, at 8:52 AM, w...@wkhudgins.info wrote: Hello, I recently emailed the group about submitting an RFC for str_begins() and str_ends() functions. The RFC has now been officially submitted and is viewable at: https://wiki.php.net/rfc/add_str_

Re: [PHP-DEV] RFC Posted for str_begins and str_ends functions

2016-08-13 Thread Simon Welsh
> On 2/08/2016, at 8:52 AM, w...@wkhudgins.info wrote: > > Hello, > > I recently emailed the group about submitting an RFC for str_begins() and > str_ends() functions. The RFC has now been officially submitted and is > viewable at: > > https://wiki.php.net/rfc/add_str_begin_and_end_functions >

Re: [PHP-DEV] RFC Posted for str_begins and str_ends functions

2016-08-13 Thread Lester Caine
On 04/08/16 06:50, Stanislav Malyshev wrote: >> I guess that "i" isn't appliable when it have slashes. >> > In this case, functions should be: strbegins, stribegins, strends, >> > striends. >> > In all case, I think that is better a third parameter and keep underlined. > Please, not stribegins. W

Re: [PHP-DEV] RFC Posted for str_begins and str_ends functions

2016-08-12 Thread Bishop Bettini
On Fri, Aug 12, 2016 at 8:37 PM, wrote: > I've updated the RFC to reflect the discussion here and on github. You may > see it at > https://wiki.php.net/rfc/add_str_begin_and_end_functions . You can see > the github PR at https://github.com/php/php-src/pull/2049 . > > The motivation for these chan

Re: [PHP-DEV] RFC Posted for str_begins and str_ends functions

2016-08-12 Thread will
I've updated the RFC to reflect the discussion here and on github. You may see it at https://wiki.php.net/rfc/add_str_begin_and_end_functions . You can see the github PR at https://github.com/php/php-src/pull/2049 . The motivation for these changes was to maximize consistency between the propo

Re: [PHP-DEV] RFC Posted for str_begins and str_ends functions

2016-08-03 Thread Stanislav Malyshev
Hi! > I guess that "i" isn't appliable when it have slashes. > In this case, functions should be: strbegins, stribegins, strends, striends. > In all case, I think that is better a third parameter and keep underlined. Please, not stribegins. We have enough functions with weird names :) I am ambiva

Re: [PHP-DEV] RFC Posted for str_begins and str_ends functions

2016-08-03 Thread Christoph Becker
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 pointin

Re: [PHP-DEV] RFC Posted for str_begins and str_ends functions

2016-08-03 Thread Lauri Kenttä
Hello, 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. function str_begins($a, $b) { return substr_compare($a,

Re: [PHP-DEV] RFC Posted for str_begins and str_ends functions

2016-08-02 Thread Yasuo Ohgaki
On Wed, Aug 3, 2016 at 7:44 AM, Yasuo Ohgaki wrote: > as programmer does not have to know that's the TRUE means. s/that's/what's/ I shouldn't write mails while writing code :( -- Yasuo Ohgaki yohg...@ohgaki.net -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: htt

Re: [PHP-DEV] RFC Posted for str_begins and str_ends functions

2016-08-02 Thread will
On 2016-08-02 18:44, Yasuo Ohgaki wrote: Hi David, On Tue, Aug 2, 2016 at 10:36 AM, David Rodrigues wrote: Sara Golemon wrote: Feeling "meh" on it (neither for nor against), but I would consider consistency with other str*() functions by making case-insensitivity live in separate functions r

Re: [PHP-DEV] RFC Posted for str_begins and str_ends functions

2016-08-02 Thread Rowan Collins
On 02/08/2016 23:44, Yasuo Ohgaki wrote: It might be okay to have "s" in function names, but if we want to be consistent, str_replace -> str_replaces str_ireplace -> str_ireplaces IMO, following names are better for consistency. str_begin str_ibegin str_end str_iend I think those names mean

Re: [PHP-DEV] RFC Posted for str_begins and str_ends functions

2016-08-02 Thread Yasuo Ohgaki
Hi David, On Tue, Aug 2, 2016 at 10:36 AM, David Rodrigues wrote: > Sara Golemon wrote: >> Feeling "meh" on it (neither for nor against), but I would consider >> consistency with other str*() functions by making case-insensitivity >> live in separate functions rather than as a parameter. e.g. >>

Re: [PHP-DEV] RFC Posted for str_begins and str_ends functions

2016-08-01 Thread David Rodrigues
Sara Golemon wrote: > Feeling "meh" on it (neither for nor against), but I would consider > consistency with other str*() functions by making case-insensitivity > live in separate functions rather than as a parameter. e.g. > str_begins(), str_ibegins(), str_ends(), end_iends() I guess that "i" isn

Re: [PHP-DEV] RFC Posted for str_begins and str_ends functions

2016-08-01 Thread Yasuo Ohgaki
On Tue, Aug 2, 2016 at 7:56 AM, Sara Golemon wrote: > On Mon, Aug 1, 2016 at 3:52 PM, wrote: >> I recently emailed the group about submitting an RFC for str_begins() and >> str_ends() functions. The RFC has now been officially submitted and is >> viewable at: >> >> https://wiki.php.net/rfc/add_s

Re: [PHP-DEV] RFC Posted for str_begins and str_ends functions

2016-08-01 Thread Sara Golemon
On Mon, Aug 1, 2016 at 3:52 PM, wrote: > I recently emailed the group about submitting an RFC for str_begins() and > str_ends() functions. The RFC has now been officially submitted and is > viewable at: > > https://wiki.php.net/rfc/add_str_begin_and_end_functions > Feeling "meh" on it (neither fo

[PHP-DEV] RFC Posted for str_begins and str_ends functions

2016-08-01 Thread will
Hello, I recently emailed the group about submitting an RFC for str_begins() and str_ends() functions. The RFC has now been officially submitted and is viewable at: https://wiki.php.net/rfc/add_str_begin_and_end_functions The github PR may be found at: https://github.com/php/php-src/pull/20