summaryrefslogtreecommitdiff
path: root/tests/lang/bug21849.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lang/bug21849.phpt')
-rw-r--r--tests/lang/bug21849.phpt16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/lang/bug21849.phpt b/tests/lang/bug21849.phpt
new file mode 100644
index 0000000..30b3113
--- /dev/null
+++ b/tests/lang/bug21849.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Bug #21849 (self::constant doesn't work as method's default parameter)
+--FILE--
+<?php
+class foo {
+ const bar = "fubar\n";
+
+ function foo($arg = self::bar) {
+ echo $arg;
+ }
+}
+
+new foo();
+?>
+--EXPECT--
+fubar