note 81282 rejected from function.get-defined-constants by danbrown

From: Date: Sat, 19 Jul 2008 23:58:31 +0000
Subject: note 81282 rejected from function.get-defined-constants by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-141815@lists.php.net to get a copy of this message
Note Submitter: ryan at crystaldawn dot net ---- I'm not so sure eslindsey AT gma il dot co m is correct. From my experience, using constance in an array works fine if you think about it as a math constant. Take the example below, it works on 4.x and 5.x <? //Our define, probably located in a config file somewhere define('SomeName', 3); //The call to our function test(); //The function itself function test() { $test = array('10', '13', 'whatever', 'somethingelse', '85'); echo $hithere = $test[(SomeName)]; echo "\n"; echo "\n"; } ?>

« previous php.notes (#141815) next »