Hi David, > I would like to suggest that static vars must allow expressions too. > Currently it only supports scalar values, but different to consts, it could > be manipulated by its own function that uses that.
This idea was brought up 6 months ago with others in https://wiki.php.net/rfc/calls_in_constant_expressions_poll#vote (See the poll for "Support calls in static variables") The straw poll voting results were 14 against and 2 in favor of a limited subset of that functionality (and 0 for "any variable"). Even with more compelling examples and references, and only focusing on one area, I personally doubt this would pass. (a 2/3 majority is required) The 6 months period for repeating RFC ideas has passed. The implementation for the corresponding RFC may be of use to anyone interested on working on similar areas, but I'm currently not interested in doing further work on the implementation. Thanks, - Tyson -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php