php-src/Zend/tests/traits/language001.phpt
Stefan Marr b501570ab0 Added traits test cases. No engine changes for now. [TRAITS]
#Getting accustomed to the infrastructure.
#Any comments are welcome, especially with regard to syntax and keywords.
2010-04-15 21:39:20 +00:00

22 lines
254 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();
?>
--EXPECTF--
Hello