Re: class constants

From: Date: Wed, 08 Mar 2006 00:53:46 +0000
Subject: Re: class constants
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-231631@lists.php.net to get a copy of this message
I've try this with no successful results. the constant rr and gg were not in the array $ee. <?php class something { const rr = "lala"; const gg = "ggerer"; } $ee = get_defined_constants(); foreach ($ee as $key => $value) echo $key." => ".$value."</br>"; ?> On 3/7/06, Jared Williams <jared.williams1@ntlworld.com> wrote: > > > Hi, > > ReflectionClass > > getConstant > getConstants > hasConstant > > > http://www.ren.dotgeek.org/classbrowser/class.php?class=ReflectionClass > > Jared > > > -----Original Message----- > > From: Arnaldo Gandol [mailto:agacode@gmail.com] > > Sent: 07 March 2006 21:03 > > To: php-general@lists.php.net > > Subject: [PHP] class constants > > > > how can I to iterate the class constant without knowing their > > names?, I've reviewed the Class/Object Functions and > > Reflexion and nothing, I dont want to use static class > > variables, can any one help. > > > >

« previous php.general (#231631) next »