> I'd much rather have something like: > > declare(ambiguous_element_lookup=0) > > declare(ambiguous_element_lookup=off)
Aside: declare(unambiguous_element_lookup=1) is probably a better choice than my first choice of (disable_ambiguous_element_lookup=1), but probably not the best choice. > I find that the “disable_ambiguous_element_lookup” directive name is, well, > ambiguous. > Does it mean that it will look up only in the current namespace, or only in > the global namespace? I can’t guess. > > Maybe a three-value directive: > > declare(function_and_const_lookup=global); > declare(function_and_const_lookup=namespace); > declare(function_and_const_lookup=fallback); // the default That's my favorite setting name overall so far - it ends up being as long as disable_ambiguous_element_lookup and more self-explanatory. I don't plan to include namespace-only in the RFC - future RFCs could propose additional values independently. Probably just `= global` and `= default`, because the default might eventually change (from the fallback), and = fallback could be added if the old fallback was desirable enough. - `= default` would only be useful to set resolution back to the default with future language changes such as https://wiki.php.net/rfc/namespace_scoped_declares#implementation_considerations > "namespace_lookup" It might cause confusion when a new php programmer tries to set this setting, and discovers that catch(Exception) {} still means MyNS\Exception with declare(namespace_lookup=global). (assuming you meant something along those lines) -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php