php-src/Zend/tests/class_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
334 B
PHP

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