4 ms·
I had similar thoughts, but do appreciate the additional mb_ functions bringing multi byte support to some remaining functions. Also people should be coding de
by kyleee 2y ago
I had similar thoughts, but do appreciate the additional mb_ functions bringing multi byte support to some remaining functions.
Also people should be coding defensively with things like “if not defined” when implementing their own global helper functions (or avoid doing that at all)
- williamdclt 2y ago"if not defined" doesn't help, if your own `array_find` doesn't have the same signature and semantics than the new global then you're screwed. You'd want the opposite: overwrite it if it already exists in the global scope (dunno if that's easy / how that'd work in PHP)
- asddubs 2y agothe answer is using a namespace
- nodogoto 2y agoYou can't redefine functions in PHP.
- mklepaczewski 2y agoThere are extensions which allow you to redefine even constants.
- someothherguyy 2y ago> `array_find` doesn't have the same signature and semantics than the new global then you're screwed Screwed? Just rename or move the function to a namespace in an IDE and it will update all your references?