1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00
Files
archived-php-src/Zend/tests/traits/language001.phpt
2020-02-03 22:52:20 +01:00

22 lines
255 B
PHP

--TEST--
Single Trait with simple trait method
--FILE--
<?php
error_reporting(E_ALL);
trait THello {
public function hello() {
echo 'Hello';
}
}
class TraitsTest {
use THello;
}
$test = new TraitsTest();
$test->hello();
?>
--EXPECT--
Hello