mirror of
https://github.com/php/php-src.git
synced 2024-11-28 04:14:26 +08:00
28 lines
383 B
PHP
28 lines
383 B
PHP
--TEST--
|
|
Testing class_exists() inside namespace
|
|
--FILE--
|
|
<?php
|
|
|
|
namespace foo;
|
|
|
|
class foo {
|
|
|
|
}
|
|
|
|
class_alias(__NAMESPACE__ .'::foo', 'bar');
|
|
|
|
|
|
var_dump(class_exists('::bar'));
|
|
var_dump(class_exists('bar'));
|
|
var_dump(class_exists('foo::bar'));
|
|
var_dump(class_exists('foo::foo'));
|
|
var_dump(class_exists('foo'));
|
|
|
|
?>
|
|
--EXPECT--
|
|
bool(true)
|
|
bool(true)
|
|
bool(false)
|
|
bool(true)
|
|
bool(false)
|