Hey Tyson,

I voted "No" on this one, sorry.

TL;DR: I'd rather have a mechanism to disable global function fallback, not
something that makes un-imported symbols immediately global.

The idea to disable PHP's implicit
"fallback-to-something-that-may-or-may-not-exist" is great, and it could
simplify some of the engine, as well as remove some caching mechanisms
(lookup) in some contexts, but I'm pretty happy with disabling all global
lookup functionality, rather than making them the default.

I don't have a problem with `use function sprintf;` to import things from
PHP, and actually use it to quickly grep whenever I do something extremely
dangerous (like `use function umask;`).
This gives me also a good overview of how much of the global symbols are
still in my system, and to be replaced with something like
`thecodingmachine/safe`.

I also deal with merge conflicts regularly: not a big issue either.

Greets,

Marco Pivetta

http://twitter.com/Ocramius

http://ocramius.github.com/


On Wed, Jan 29, 2020 at 3:22 AM tyson andre <tysonandre...@hotmail.com>
wrote:

> Hi internals,
>
> I've opened the vote on https://wiki.php.net/rfc/use_global_elements
> after weighing the pros and cons of discussed alternative approaches.
> Yesterday, I've finished the last set of updates I announced I would do
> based on RFC feedback.
>
> (that update was to require the statement 'use function ...'/'use const
> ...' before declaring that function/const
> outside the global namespace,
> if declare(function_and_const_lookup='global') is opted into)
>
> Voting closes on 2020-02-11.
>
> Thanks,
> - Tyson
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

Reply via email to