xref: /PHP-8.1/Zend/tests/ns_039.phpt (revision 7aacc705)
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?>
21--EXPECT--
22ok
23ok
24ok
25ok
26ok
27