1--TEST--
2Check that all internal parameter defaults evaluate without error
3--FILE--
4<?php
5
6function checkDefaults(ReflectionFunctionAbstract $rf) {
7    foreach ($rf->getParameters() as $param) {
8        if ($param->isDefaultValueAvailable()) {
9            try {
10                $param->getDefaultValue();
11            } catch (Error $e) {
12                echo "{$rf->getName()}: {$e->getMessage()}\n";
13            }
14        }
15    }
16}
17
18foreach (get_defined_functions()["internal"] as $func) {
19    $rf = new ReflectionFunction($func);
20    checkDefaults($rf);
21}
22
23foreach (get_declared_classes() as $class) {
24    $rc = new ReflectionClass($class);
25    foreach ($rc->getMethods() as $method) {
26        checkDefaults($method);
27    }
28}
29
30?>
31===DONE===
32--EXPECT--
33===DONE===
34