php-src/ext/reflection/tests/bug33312.phpt
Marcus Boerger 352d4a6d8c - Prefix test names
- Add missing skipif
2006-03-12 12:11:22 +00:00

23 lines
486 B
PHP
Executable File

--TEST--
Reflection Bug #33312 (ReflectionParameter methods do not work correctly)
--SKIPIF--
<?php extension_loaded('reflection') or die('skip'); ?>
--FILE--
<?php
class Foo {
public function bar(Foo $foo, $bar = 'bar') {
}
}
$class = new ReflectionClass('Foo');
$method = $class->getMethod('bar');
foreach ($method->getParameters() as $parameter) {
if ($parameter->isDefaultValueAvailable()) {
print $parameter->getDefaultValue()."\n";
}
}
?>
--EXPECT--
bar