2008-05-13 01:55:21 +08:00
|
|
|
--TEST--
|
|
|
|
Testing class_exists() inside namespace
|
|
|
|
--FILE--
|
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace foo;
|
|
|
|
|
|
|
|
class foo {
|
2018-09-17 01:16:42 +08:00
|
|
|
|
2008-05-13 01:55:21 +08:00
|
|
|
}
|
|
|
|
|
2008-12-05 04:12:30 +08:00
|
|
|
class_alias(__NAMESPACE__ .'\foo', 'bar');
|
2008-05-13 01:55:21 +08:00
|
|
|
|
|
|
|
|
2008-12-05 04:12:30 +08:00
|
|
|
var_dump(class_exists('\bar'));
|
2008-05-13 01:55:21 +08:00
|
|
|
var_dump(class_exists('bar'));
|
2008-12-05 04:12:30 +08:00
|
|
|
var_dump(class_exists('foo\bar'));
|
|
|
|
var_dump(class_exists('foo\foo'));
|
2008-05-13 01:55:21 +08:00
|
|
|
var_dump(class_exists('foo'));
|
|
|
|
|
|
|
|
?>
|
|
|
|
--EXPECT--
|
|
|
|
bool(true)
|
|
|
|
bool(true)
|
|
|
|
bool(false)
|
|
|
|
bool(true)
|
|
|
|
bool(false)
|