xref: /PHP-7.0/Zend/tests/ns_039.phpt (revision 1836daf7)
1--TEST--
2039: Constant declaration
3--FILE--
4<?php
5function foo($a = A) {
6	echo "$a\n";
7}
8function bar($a = array(A => B)) {
9	foreach ($a as $key => $val) {
10		echo "$key\n";
11		echo "$val\n";
12	}
13}
14const A = "ok";
15const B = A;
16echo A . "\n";
17echo B . "\n";
18foo();
19bar();
20--EXPECT--
21ok
22ok
23ok
24ok
25ok
26