]> granicus.if.org Git - php/commitdiff
Added test case for bug #21094
authorMoriyoshi Koizumi <moriyoshi@php.net>
Sat, 18 Jan 2003 19:44:12 +0000 (19:44 +0000)
committerMoriyoshi Koizumi <moriyoshi@php.net>
Sat, 18 Jan 2003 19:44:12 +0000 (19:44 +0000)
tests/lang/bug21094.phpt [new file with mode: 0644]

diff --git a/tests/lang/bug21094.phpt b/tests/lang/bug21094.phpt
new file mode 100644 (file)
index 0000000..266a1d6
--- /dev/null
@@ -0,0 +1,17 @@
+--TEST--
+Bug #21094 (set_error_handler not accepting methods)
+--FILE--
+<?php
+class test {
+       function hdlr($errno, $errstr, $errfile, $errline) {
+               printf("[%d] errstr: %s, errfile: %s, errline: %d\n", $errno, $errstr, $errfile, $errline, $errstr);
+       }
+}      
+
+set_error_handler(array(new test(), "hdlr"));
+
+trigger_error("test");
+?>
+--EXPECTF--
+[1024] errstr: test, errfile: %s, errline: %d
+