xref: /PHP-7.4/Zend/tests/class_exists_001.phpt (revision 782352c5)
1--TEST--
2Testing class_exists() inside namespace
3--FILE--
4<?php
5
6namespace foo;
7
8class foo {
9
10}
11
12class_alias(__NAMESPACE__ .'\foo', 'bar');
13
14
15var_dump(class_exists('\bar'));
16var_dump(class_exists('bar'));
17var_dump(class_exists('foo\bar'));
18var_dump(class_exists('foo\foo'));
19var_dump(class_exists('foo'));
20
21?>
22--EXPECT--
23bool(true)
24bool(true)
25bool(false)
26bool(true)
27bool(false)
28