mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
20 lines
440 B
Plaintext
20 lines
440 B
Plaintext
|
--TEST--
|
||
|
Promoting require_once warning to exception
|
||
|
--FILE--
|
||
|
<?php
|
||
|
|
||
|
function exception_error_handler($errno, $errstr, $errfile, $errline ) {
|
||
|
throw new Exception($errstr);
|
||
|
}
|
||
|
set_error_handler("exception_error_handler");
|
||
|
|
||
|
try {
|
||
|
$results = require_once 'does-not-exist.php';
|
||
|
} catch (Exception $e) {
|
||
|
echo $e->getMessage(), "\n";
|
||
|
};
|
||
|
|
||
|
?>
|
||
|
--EXPECT--
|
||
|
require_once(does-not-exist.php): Failed to open stream: No such file or directory
|