Re: [RFC] Allow calls to global functions in constant expressions
| From: | tyson andre | Date: | Fri, 14 Feb 2020 17:54:40 +0000 |
| Subject: | Re: [RFC] Allow calls to global functions in constant expressions | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-108587@lists.php.net to get a copy of this message | ||
> - Solving the above two issues while continuing to throw for func_get_args(),
> get_defined_vars(), etc.
> get_defined_vars() would throw for dynamic calls
Then again, it's already possible to get function parameters through debug_backtrace(), so
implicitly creating a closure and call with 0 bind vars wrapping the function calls might be an
acceptable tradeoff.
- Possibly leave that closure out for calls known to not be dynamic internal calls
- It might make sense to blacklist known function names such as func_get_args(), get_defined_vars(),
etc to prevent writing that type of buggy code, e..g. in parameter default expressions
Thoughts?