Re: class constants

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxx> wrote:
>
>
> Hi,
>
> ReflectionClass
>
> getConstant
> getConstants
> hasConstant
>
> http://www.ren.dotgeek.org/classbrowser/class.php?class=ReflectionClass
>
> Jared
>
> > -----Original Message-----
> > From: Arnaldo Gandol [mailto:agacode@xxxxxxxxx]
> > Sent: 07 March 2006 21:03
> > To: php-general@xxxxxxxxxxxxx
> > Subject:  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.
> >
>
>

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux