xref: /PHP-8.2/Zend/tests/traits/constant_003.phpt (revision 3b62d660)
1--TEST--
2Non-final Constants in traits can be overridden in derived classes
3--FILE--
4<?php
5
6trait Foo {
7    public const A = 123;
8}
9
10class Base {
11    use Foo;
12}
13
14class Derived extends Base {
15    public const A = 456;
16}
17
18echo Derived::A, PHP_EOL;
19?>
20--EXPECTF--
21456
22