mirror of
https://github.com/php/php-src.git
synced 2024-12-25 01:40:50 +08:00
35 lines
467 B
PHP
35 lines
467 B
PHP
--TEST--
|
|
Bug #47593 (interface_exists() returns false when using absolute namespace path)
|
|
--FILE--
|
|
<?php
|
|
|
|
namespace test;
|
|
const TEST = 11;
|
|
|
|
class foo {
|
|
public function xyz() {
|
|
}
|
|
}
|
|
|
|
interface baz {
|
|
}
|
|
|
|
function bar() {
|
|
}
|
|
|
|
|
|
var_dump(interface_exists('\test\baz'));
|
|
var_dump(function_exists('\test\bar'));
|
|
var_dump(constant('\test\TEST'));
|
|
var_dump(defined('\test\TEST'));
|
|
var_dump(defined('TEST'));
|
|
|
|
|
|
?>
|
|
--EXPECT--
|
|
bool(true)
|
|
bool(true)
|
|
int(11)
|
|
bool(true)
|
|
bool(false)
|