xref: /PHP-7.4/Zend/tests/traits/language001.phpt (revision 782352c5)
1--TEST--
2Single Trait with simple trait method
3--FILE--
4<?php
5error_reporting(E_ALL);
6
7trait THello {
8  public function hello() {
9    echo 'Hello';
10  }
11}
12
13class TraitsTest {
14	use THello;
15}
16
17$test = new TraitsTest();
18$test->hello();
19?>
20--EXPECT--
21Hello
22