mirror of
https://github.com/php/php-src.git
synced 2024-11-24 10:24:11 +08:00
19 lines
340 B
PHP
19 lines
340 B
PHP
--TEST--
|
|
038: Name ambiguity (namespace name or internal class name)
|
|
--FILE--
|
|
<?php
|
|
namespace Exception;
|
|
function foo() {
|
|
echo "ok\n";
|
|
}
|
|
\Exception\foo();
|
|
\Exception::bar();
|
|
--EXPECTF--
|
|
ok
|
|
|
|
Fatal error: Uncaught Error: Call to undefined method Exception::bar() in %sns_038.php:7
|
|
Stack trace:
|
|
#0 {main}
|
|
thrown in %sns_038.php on line 7
|
|
|