xref: /PHP-8.2/ext/reflection/tests/traits003.phpt (revision 782352c5)
1--TEST--
2Reflection and Traits
3--FILE--
4<?php
5
6abstract class foo {
7}
8
9trait bar {
10
11}
12
13final class baz {
14
15}
16
17$x = new ReflectionClass('foo');
18var_dump($x->isTrait());
19
20$x = new ReflectionClass('bar');
21var_dump($x->isTrait());
22
23$x = new ReflectionClass('baz');
24var_dump($x->isTrait());
25
26?>
27--EXPECT--
28bool(false)
29bool(true)
30bool(false)
31