summaryrefslogtreecommitdiff
path: root/Zend/tests/ns_041.phpt
blob: 3a2fe7758b3c679ef7763b245cdcd73059705d5b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
--TEST--
041: Constants in namespace
--FILE--
<?php
namespace test\ns1;

const FOO = "ok\n";

echo(FOO);
echo(\test\ns1\FOO);
echo(\test\ns1\FOO);
echo(BAR);

const BAR = "ok\n";
--EXPECTF--
ok
ok
ok

Fatal error: Uncaught Error: Undefined constant 'test\ns1\BAR' in %s:%d
Stack trace:
#0 {main}
  thrown in %s on line %d