summaryrefslogtreecommitdiff
path: root/Zend/tests/ns_076.phpt
blob: ea97e924b1b243fc8234415c4b845a001a4cd32c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
--TEST--
076: Unknown constants in namespace
--FILE--
<?php
namespace foo;

$a = array(unknown => unknown);

echo unknown;
echo "\n";
var_dump($a);
echo \unknown;
--EXPECTF--
Warning: Use of undefined constant unknown - assumed 'unknown' (this will throw an Error in a future version of PHP) in %sns_076.php on line %d

Warning: Use of undefined constant unknown - assumed 'unknown' (this will throw an Error in a future version of PHP) in %sns_076.php on line %d

Warning: Use of undefined constant unknown - assumed 'unknown' (this will throw an Error in a future version of PHP) in %sns_076.php on line %d
unknown
array(1) {
  ["unknown"]=>
  %s(7) "unknown"
}

Fatal error: Uncaught Error: Undefined constant 'unknown' in %sns_076.php:%d
Stack trace:
#0 {main}
  thrown in %sns_076.php on line %d