xref: /PHP-8.2/Zend/tests/bug77966.phpt (revision b03cafd1)
1--TEST--
2Bug #77966: Cannot alias a method named "namespace"
3--FILE--
4<?php
5
6trait A {
7    function namespace() {
8        echo "Called\n";
9    }
10}
11
12class C {
13    use A {
14        namespace as bar;
15    }
16}
17
18$c = new C;
19$c->bar();
20$c->namespace();
21
22?>
23--EXPECT--
24Called
25Called
26