Re: Why Constants could Not be Array?

From: Date: Sat, 30 Apr 2011 16:52:45 +0000
Subject: Re: Why Constants could Not be Array?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-312596@lists.php.net to get a copy of this message
Hello Walkinraven, I use serialize for that. define("MY_CONSTANT", serialize(array("1", "2", "hello"))); -- With best regards from Ukraine, Andre Skype: Francophile My blog: http://oire.org/menelion (mostly in Russian) Twitter: http://twitter.com/m_elensule Facebook: http://facebook.com/menelion ------------ Original message ------------ From: Walkinraven <walkinraven@gmail.com> To: php-general@lists.php.net Date created: , 12:51:15 PM Subject: [PHP] Why Constants could Not be Array? For needing a constants=array, I have to use 'public static $a = array(...)' instead. Why the language could not relax the restriction of constants? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#312596) next »