Re: Class Constants
| From: | Floyd Resler | Date: | Wed, 13 Apr 2011 18:58:02 +0000 |
| Subject: | Re: Class Constants | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-312389@lists.php.net to get a copy of this message | ||
David,
That worked great!
Thanks!
Floyd
On Apr 13, 2011, at 2:25 PM, David Harkness wrote:
> On Wed, Apr 13, 2011 at 11:04 AM, Floyd Resler <fresler@adex-intl.com>wrote:
>
>> That didn't quite work. Here's what I did:
>> $const=$argv[1];
>> $value=email::$const;
>>
>
> Instead try this:
>
> $const = $argv[1];
> $reflector = new ReflectionClass('email');
> $value = $reflector->getConstant($const);
>
> David