Re: [PHP-DEV] [RFC] Allow calls to global functions in constant expressions

2020-02-10 Thread Mike Schinkel
> > On Feb 10, 2020 at 3:45 AM, mailto:ocram...@gmail.com)> > wrote: > > > > > > For once, we would have a function with a self-describing, clear name: > > > > Seriously?That function name reminds me of COBOL programming. > > > > CTRL+S

Re: [PHP-DEV] [RFC] Allow calls to global functions in constant expressions

2020-02-10 Thread Marco Pivetta
On Sun, Feb 9, 2020 at 10:33 PM Mike Schinkel wrote: > 2. Do we really want to add a standard library function 53 characters > long? > > Can we not come up with a more concise name than > get_defined_functions_allowed_in_constant_expressions(), like maybe > get_const_expr_funcs() or get_const_exp

Re: [PHP-DEV] [RFC] Allow calls to global functions in constant expressions

2020-02-09 Thread Mike Schinkel
> On Feb 9, 2020, at 8:34 PM, tyson andre wrote: > >> 1. Why again are MyClass::methodName() not considered for the non-whitelist >> vote? >> >> Seems to me a developer would be more inclined to implement the expressions >> that define the class constant's value in a method of the class than

Re: [PHP-DEV] [RFC] Allow calls to global functions in constant expressions

2020-02-09 Thread tyson andre
> 1. Why again are MyClass::methodName() not considered for the non-whitelist > vote? > > Seems to me a developer would be more inclined to implement the expressions > that define the class constant's value in a method of the class than in an > external function. My reasons for doing this wer

Re: [PHP-DEV] [RFC] Allow calls to global functions in constant expressions

2020-02-09 Thread Mike Schinkel
> On Feb 9, 2020, at 4:02 PM, tyson andre wrote: > > https://wiki.php.net/rfc/calls_in_constant_expressions has been updated and > moved to > "Under Discussion". > > This proposes allowing function calls in constant declarations, static > property defaults, > static variables, and parameter de