On Saturday, 30 April 2011 at 10:51, Walkinraven wrote: For needing a constants=array, I have to use > 'public static $a = array(...)' > > instead. > > Why the language could not relax the restriction of constants?
As I understand it constants must be declarations not evaluations because they're initialised during parsing not execution. Arrays are evaluations even if they only contain literal values. It could be done, but it would require a fundamental change to the engine and the benefit-cost calculation just doesn't add up. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php