xref: /PHP-8.0/ext/spl/tests/class_uses_basic.phpt (revision b5c7a83d)
1--TEST--
2SPL: Test class_implements() function : basic
3--FILE--
4<?php
5echo "*** Testing class_uses() : basic ***\n";
6
7
8trait foo { }
9class bar { use foo; }
10
11var_dump(class_uses(new bar));
12var_dump(class_uses('bar'));
13
14
15?>
16--EXPECT--
17*** Testing class_uses() : basic ***
18array(1) {
19  ["foo"]=>
20  string(3) "foo"
21}
22array(1) {
23  ["foo"]=>
24  string(3) "foo"
25}
26