Hi

> Just a question.
> Would this also be allowed?
>
> https://3v4l.org/RGdIA
> <?php
>
> class A {public int $i = 42;}
> const BARE_CONSTANT = new A;
> class B {
>     const ClassConstant = BARE_CONSTANT;
> }
> class C {
>     const ClassConstantViaPropertyFetching1 = BARE_CONSTANT->i;
>     const ClassConstantViaPropertyFetching2 = B::ClassConstant->i;
> }

Yes, that would work fine.

Ilija

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

Reply via email to