php-src/Zend/tests/ns_076.phpt
2020-07-10 21:05:28 +02:00

31 lines
458 B
PHP

--TEST--
076: Unknown constants in namespace
--FILE--
<?php
namespace foo;
use Error;
try {
$a = array(unknown => unknown);
} catch (Error $e) {
echo $e->getMessage(), "\n";
}
try {
echo unknown;
} catch (Error $e) {
echo $e->getMessage(), "\n";
}
try {
echo \unknown;
} catch (Error $e) {
echo $e->getMessage(), "\n";
}
?>
--EXPECT--
Undefined constant "foo\unknown"
Undefined constant "foo\unknown"
Undefined constant "unknown"