xref: /PHP-7.1/Zend/tests/ns_041.phpt (revision 113213f0)
1--TEST--
2041: Constants in namespace
3--FILE--
4<?php
5namespace test\ns1;
6
7const FOO = "ok\n";
8
9echo(FOO);
10echo(\test\ns1\FOO);
11echo(\test\ns1\FOO);
12echo(BAR);
13
14const BAR = "ok\n";
15--EXPECTF--
16ok
17ok
18ok
19
20Notice: Use of undefined constant BAR - assumed 'BAR' in %sns_041.php on line 9
21BAR
22