> On Feb 9, 2020, at 4:02 PM, tyson andre <tysonandre...@hotmail.com> 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 defaults.
> It includes a secondary voting option to allow any function calls,
> and not just a small set of whitelisted core functions.
> Other expression types would continue to be forbidden in constant expressions 
> (variables, method calls, etc)
> 
> Let me know if you have any comments on the RFC or implementation.

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.

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_expressions()?

-Mike
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to