Closed nikolaposa closed 8 years ago
To avoid the BC break you could instead add the getBy
method, and leave the get()
method as is (but mark it deprecated). If you go down that path, add getBy
with visibility private
please :-)
Yeah, I agree, I was also thinking about making class final
. :) So what you do you think, should this PR go towards BC break or you would like to have these changes in some near future release?
Would prefer my suggestion. :-)
Thank you :-)
Intent of this PR is to slightly improve performance of
getBy*()
methods, particularlygetByNumeric()
, by reducing number ofstrcasecmp()
invocations down to one.Also, internal
get()
method now has more cleaner interface (renamed togetBy($key, $value)
).Notice: These modifications introduce BC break.