Plus as it is a constant it's value cannot be changed in the context of the 
object.
However you could implement a method for this, e.g. get_status(); which then 
returns an array. But the final keyword would be more comfortable....


"Sebastian Schneider" <[EMAIL PROTECTED]> schrieb im Newsbeitrag 
news:[EMAIL PROTECTED]
> Sebastian Bergmann schrieb:
>> Sebastian Schneider schrieb:
>>> public static final $bar = "foobar's world";
>>
>>  We have the const keyword for that.
>>
>
> But doesn't work with arrays, e.g.
>
> public class Result {
>     const DECISION_PERMIT = 0;
>     const DECISION_DENY = 1;
>     const DECISION_INDETERMINATE = 2;
>     const DECISION_NOT_APPLICABLE = 3;
>
>     const DECISIONS = array( 'Permit', 'Deny', 'Indeterminate', 
> NotApplicable' );
>
>   //....
>
> }
>
> thus you need to work around with private/protected statics, which
> seems to be incoherent to me. 

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to