mirror of
https://github.com/php/php-src.git
synced 2024-12-19 15:00:15 +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
22 lines
273 B
PHP
22 lines
273 B
PHP
--TEST--
|
|
Testing trait_exists() inside a namespace
|
|
--FILE--
|
|
<?php
|
|
|
|
namespace foo;
|
|
|
|
trait IFoo { }
|
|
|
|
trait ITest { }
|
|
|
|
|
|
var_dump(trait_exists('IFoo'));
|
|
var_dump(trait_exists('foo\\IFoo'));
|
|
var_dump(trait_exists('FOO\\ITEST'));
|
|
|
|
?>
|
|
--EXPECT--
|
|
bool(false)
|
|
bool(true)
|
|
bool(true)
|