mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
22 lines
255 B
PHP
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
|