1--TEST--
2class constants as default function arguments and dynamically loaded classes
3--FILE--
4<?php
5
6$class_data = <<<DATA
7<?php
8class test {
9    const val = 1;
10}
11?>
12DATA;
13
14$filename = __DIR__."/cc003.dat";
15file_put_contents($filename, $class_data);
16
17function foo($v = test::val) {
18    var_dump($v);
19}
20
21include $filename;
22
23foo();
24foo(5);
25
26unlink($filename);
27
28echo "Done\n";
29?>
30--EXPECT--
31int(1)
32int(5)
33Done
34