xref: /PHP-7.3/Zend/tests/bug30998.phpt (revision 782352c5)
1--TEST--
2Bug #30998 (Crash when user error handler returns false)
3--FILE--
4<?php
5error_reporting(-1);
6
7function my_error($errno, $errstr, $errfile, $errline)
8{
9        print "$errstr ($errno) in $errfile:$errline\n";
10        return false;
11}
12set_error_handler('my_error');
13
14$f = fopen("/tmp/blah", "r");
15?>
16===DONE===
17--EXPECTF--
18fopen(/tmp/blah): failed to open stream: %s (2) in %s:%d
19
20Warning: fopen(/tmp/blah): failed to open stream: %s in %s on line %d
21===DONE===
22