Re: [RFC][DISCUSSION] Deprecation of fallback to root scope
| From: | Stanislav Malyshev | Date: | Wed, 07 Feb 2018 03:53:23 +0000 |
| Subject: | Re: [RFC][DISCUSSION] Deprecation of fallback to root scope | ||
| References: | 1 2 3 4 5 6 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-101797@lists.php.net to get a copy of this message | ||
Hi!
> It's an ironic coincidence that you use strlen() as an example.
> Because it and substr() are possibly the most likely to be overriden,
> where we need code to be byte-safe in spite of mbstring.func_overload.
Also happens rather rarely, in my impression, since you'd have to a) run
mbstring.func_overload which you can't remove and b) still need
non-overloaded string functions. And if you are in this rare situation,
it's usually better to have explicitly-named function, so that you know
what you are dealing with, not relying on subtle details of how names
are resolved vs. namespaces.
--
Stas Malyshev
smalyshev@gmail.com