summaryrefslogtreecommitdiff
path: root/ext/reflection/tests/internal_parameter_default_value/ReflectionParameter_isDefaultValueAvailable_Internal.phpt
blob: bcdcb68f19f4501e8c0595ac31f8193b6df808f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
--TEST--
ReflectionParameter::isDefaultValueAvailable() should also work for parameters of internal functions
--FILE--
<?php
$class = new ReflectionClass('DateTime');
$method = $class->getMethod('setTime');

foreach ($method->getParameters() as $parameter) {
    var_dump($parameter->isDefaultValueAvailable());
}

echo "----------\n";

$class = new ReflectionClass('DateTimeZone');
$method = $class->getMethod('listIdentifiers');

foreach ($method->getParameters() as $parameter) {
    var_dump($parameter->isDefaultValueAvailable());
}
?>
--EXPECT--
bool(false)
bool(false)
bool(true)
bool(true)
----------
bool(true)
bool(true)