blob: 09398ec35c58687ad675b63ea34bb103f0ef7019 (
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
|