diff options
| author | Derick Rethans <github@derickrethans.nl> | 2012-08-24 10:56:03 +0200 |
|---|---|---|
| committer | Derick Rethans <github@derickrethans.nl> | 2012-08-24 10:56:03 +0200 |
| commit | bc602495d7e15f3684aaff22b96e9dfb1122b424 (patch) | |
| tree | a994c9f36fdb744dbd55058b41c827f7b1aaa04a /ext/reflection/tests/bug62715.phpt | |
| parent | de59314a60e6503550546f38fc6ebb141d2fbfdb (diff) | |
| parent | 21f085720cbb8967d6f7826a18e2ce71b6f0e216 (diff) | |
| download | php-git-bc602495d7e15f3684aaff22b96e9dfb1122b424.tar.gz | |
Merge branch 'PHP-5.4' of git.php.net:/php-src into PHP-5.4
Diffstat (limited to 'ext/reflection/tests/bug62715.phpt')
| -rw-r--r-- | ext/reflection/tests/bug62715.phpt | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/ext/reflection/tests/bug62715.phpt b/ext/reflection/tests/bug62715.phpt new file mode 100644 index 0000000000..feb67f614b --- /dev/null +++ b/ext/reflection/tests/bug62715.phpt @@ -0,0 +1,24 @@ +--TEST-- +Bug #62715 (ReflectionParameter::isDefaultValueAvailable() wrong result) +--FILE-- +<?php + +function test(PDO $a = null, $b = 0, array $c) {} +$r = new ReflectionFunction('test'); + +foreach ($r->getParameters() as $p) { + var_dump($p->isDefaultValueAvailable()); +} + +foreach ($r->getParameters() as $p) { + if ($p->isDefaultValueAvailable()) { + var_dump($p->getDefaultValue()); + } +} +?> +--EXPECT-- +bool(true) +bool(true) +bool(false) +NULL +int(0) |
