php-src/Zend/tests/ns_041.phpt

23 lines
288 B
Plaintext
Raw Normal View History

2007-08-24 21:50:52 +08:00
--TEST--
041: Constants in namespace
--FILE--
<?php
2008-12-05 04:12:30 +08:00
namespace test\ns1;
2007-08-24 21:50:52 +08:00
const FOO = "ok\n";
echo(FOO);
2008-12-05 04:12:30 +08:00
echo(\test\ns1\FOO);
echo(\test\ns1\FOO);
2007-08-24 21:50:52 +08:00
echo(BAR);
const BAR = "ok\n";
--EXPECTF--
ok
ok
ok
Notice: Use of undefined constant BAR - assumed 'BAR' in %sns_041.php on line 9
BAR