xref: /PHP-5.5/Zend/tests/traits/methods_003.phpt (revision 74fe9dd8)
1--TEST--
2Testing __construct and __destruct with Trait
3--FILE--
4<?php
5
6trait foo {
7	public function __construct() {
8		var_dump(__FUNCTION__);
9	}
10	public function __destruct() {
11		var_dump(__FUNCTION__);
12	}
13}
14
15class bar {
16	use foo;
17}
18
19new bar;
20
21?>
22--EXPECT--
23string(11) "__construct"
24string(10) "__destruct"
25