]> granicus.if.org Git - php/commitdiff
Added test case for bug21849.phpt
authorMoriyoshi Koizumi <moriyoshi@php.net>
Thu, 23 Jan 2003 23:22:23 +0000 (23:22 +0000)
committerMoriyoshi Koizumi <moriyoshi@php.net>
Thu, 23 Jan 2003 23:22:23 +0000 (23:22 +0000)
tests/lang/bug21849.phpt [new file with mode: 0644]

diff --git a/tests/lang/bug21849.phpt b/tests/lang/bug21849.phpt
new file mode 100644 (file)
index 0000000..30b3113
--- /dev/null
@@ -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