xref: /PHP-7.2/Zend/tests/traits/language001.phpt (revision 17ccbeec)
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--EXPECTF--
21Hello
22