xref: /PHP-7.3/Zend/tests/trait_exists_001.phpt (revision 478e5d1d)
1--TEST--
2Testing trait_exists()
3--FILE--
4<?php
5
6trait foo {
7}
8
9var_dump(trait_exists('foo'));
10var_dump(trait_exists(1));
11var_dump(trait_exists(NULL));
12var_dump(trait_exists(new stdClass));
13
14?>
15--EXPECTF--
16bool(true)
17bool(false)
18bool(false)
19
20Warning: trait_exists() expects parameter 1 to be string, object given in %s on line %d
21NULL
22