Re: What is wrong with this code?

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

 



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".

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[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