summaryrefslogtreecommitdiff
path: root/ext/reflection/tests/bug62715.phpt
diff options
context:
space:
mode:
authorDerick Rethans <github@derickrethans.nl>2012-08-24 10:56:03 +0200
committerDerick Rethans <github@derickrethans.nl>2012-08-24 10:56:03 +0200
commitbc602495d7e15f3684aaff22b96e9dfb1122b424 (patch)
treea994c9f36fdb744dbd55058b41c827f7b1aaa04a /ext/reflection/tests/bug62715.phpt
parentde59314a60e6503550546f38fc6ebb141d2fbfdb (diff)
parent21f085720cbb8967d6f7826a18e2ce71b6f0e216 (diff)
downloadphp-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.phpt24
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)