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 something different: "str_begin" sounds like an
imperative "make this string begin with X"; "str_begins" is more of an
assertion "the string begins with X". Ruby would spell it with a ? at
the end. It's also the same form, grammatically, as the common "isFoo".
Note that this logic holds for "str_replace", which *is* an imperative -
you are not saying "tell me if X replaces Y", you are saying "please
replace X with Y".
Regards,
--
Rowan Collins
[IMSoP]
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php