xref: /PHP-5.6/Zend/tests/ns_076.phpt (revision 610c7fbe)
1--TEST--
2076: Unknown constants in namespace
3--FILE--
4<?php
5namespace foo;
6
7$a = array(unknown => unknown);
8
9echo unknown;
10echo "\n";
11var_dump($a);
12echo \unknown;
13--EXPECTF--
14Notice: Use of undefined constant unknown - assumed 'unknown' in %sns_076.php on line %d
15
16Notice: Use of undefined constant unknown - assumed 'unknown' in %sns_076.php on line %d
17
18Notice: Use of undefined constant unknown - assumed 'unknown' in %sns_076.php on line %d
19unknown
20array(1) {
21  ["unknown"]=>
22  %s(7) "unknown"
23}
24
25Fatal error: Undefined constant 'unknown' in %sns_076.php on line %d
26