xref: /PHP-7.3/Zend/tests/bug43344_1.phpt (revision 1b565f13)
1--TEST--
2Bug #43344.1 (Wrong error message for undefined namespace constant)
3--FILE--
4<?php
5namespace Foo;
6function f1($a=bar) {
7	return $a;
8}
9function f2($a=array(bar)) {
10	return $a[0];
11}
12function f3($a=array(bar=>0)) {
13	reset($a);
14	return key($a);
15}
16echo bar."\n";
17echo f1()."\n";
18echo f2()."\n";
19echo f3()."\n";
20?>
21--EXPECTF--
22Warning: Use of undefined constant bar - assumed 'bar' (this will throw an Error in a future version of PHP) in %sbug43344_1.php on line 13
23bar
24
25Warning: Use of undefined constant bar - assumed 'bar' (this will throw an Error in a future version of PHP) in %sbug43344_1.php on line 3
26bar
27
28Warning: Use of undefined constant bar - assumed 'bar' (this will throw an Error in a future version of PHP) in %sbug43344_1.php on line 6
29bar
30
31Warning: Use of undefined constant bar - assumed 'bar' (this will throw an Error in a future version of PHP) in %sbug43344_1.php on line 9
32bar
33