php-src/Zend/tests/trait_exists_003.phpt
Stefan Marr 478e5d1dd0 Added trait_exists() [TRAITS] [DOC]
- also changed class_exists() to return false for traits
- added related tests, and get_declared_traits() tests in ext/s/t/co
2011-01-09 19:57:41 +00:00

25 lines
341 B
PHP

--TEST--
Checking trait_exists(): interface, trait, abstract and final class
--FILE--
<?php
interface a { }
abstract class b { }
final class c { }
trait d {}
var_dump(trait_exists('a'));
var_dump(trait_exists('b'));
var_dump(trait_exists('c'));
var_dump(trait_exists('d'));
?>
--EXPECT--
bool(false)
bool(false)
bool(false)
bool(true)