Subscribe to RFC vote notifications
Poll: Places to allow function calls in constant expressions
(View on PHP.net)
PHP 8.0
Support calls in class constants
67 %
24 %
10 %
No: 14
Whitelist of global functions: 5
Any function or method call: 2
Total number of votes cast: 21
Support calls in global constants
78 %
17 %
6 %
No: 14
Whitelist of global functions: 3
Any function or method call: 1
Total number of votes cast: 18
Support calls in static property declarations
75 %
13 %
13 %
No: 12
Whitelist of global functions: 2
Any function or method call, even when the returned value contains references or arrays: 0
As many expressions as feasible (not referring to the variable scope): 2
Total number of votes cast: 16
Support calls in static variables
88 %
13 %
No: 14
Whitelist of global functions: 2
Any function or method call, even when the returned value contains references or arrays: 0
As many expressions as feasible (not referring to the variable scope): 0
Total number of votes cast: 16
Support calls in parameter defaults
78 %
17 %
6 %
No: 14
Whitelist of global functions: 3
Any function or method call, whether or not it returns a constant: 0
As many expressions as feasible (not referring to the variable scope): 1
Total number of votes cast: 18