xref: /PHP-8.1/Zend/tests/bug30998.phpt (revision d1764ca3)
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--EXPECTF--
17fopen(/tmp/blah): Failed to open stream: %s (2) in %s:%d
18
19Warning: fopen(/tmp/blah): Failed to open stream: %s in %s on line %d
20