xref: /PHP-7.4/tests/lang/bug21094.phpt (revision d679f022)
1--TEST--
2Bug #21094 (set_error_handler not accepting methods)
3--FILE--
4<?php
5class test {
6	function hdlr($errno, $errstr, $errfile, $errline) {
7		printf("[%d] errstr: %s, errfile: %s, errline: %d\n", $errno, $errstr, $errfile, $errline, $errstr);
8	}
9}
10
11set_error_handler(array(new test(), "hdlr"));
12
13trigger_error("test");
14?>
15--EXPECTF--
16[1024] errstr: test, errfile: %s, errline: %d
17