mirror of
https://github.com/php/php-src.git
synced 2024-12-24 17:30:48 +08:00
478e5d1dd0
- also changed class_exists() to return false for traits - added related tests, and get_declared_traits() tests in ext/s/t/co
25 lines
334 B
PHP
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)
|