xref: /PHP-7.4/Zend/tests/ns_041.phpt (revision d679f022)
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
20Warning: Use of undefined constant BAR - assumed 'BAR' (this will throw an Error in a future version of PHP) in %sns_041.php on line 9
21BAR
22