Re: What is wrong with this code?
| From: | Gary . | Date: | Wed, 28 Apr 2010 08:57:19 +0000 |
| Subject: | Re: What is wrong with this code? | ||
| References: | 1 2 3 4 5 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-304700@lists.php.net to get a copy of this message | ||
On 4/28/10, Jochem Maas wrote:
>> >> class Pg_Error
>> >> {
>> const INTEGRITY_CONST_UNIQUE = '23505';
>
> this is a class constant
>
>> >> private static $errors =
>> >> array(INTEGRITY_CONST_UNIQUE => 'uniqueness constraint
>> violated');
[...]
> unfortunately you cannot use a classes
> own
> constants in the definition of the $errors var
Huh? IWFM. Is it defined in the language that it does not work, or
might not work depending on the runtime environment? IMO it should
work (given the declaration order) but I know statics do have a
tendency (certainly in other laguages) to be somewhat "special".