mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
28 lines
477 B
PHP
28 lines
477 B
PHP
--TEST--
|
|
Bug #41421 (Uncaught exception from a stream wrapper segfaults)
|
|
--FILE--
|
|
<?php
|
|
|
|
class wrapper {
|
|
public $context;
|
|
function stream_open() {
|
|
return true;
|
|
}
|
|
function stream_eof() {
|
|
throw new Exception('cannot eof');
|
|
}
|
|
}
|
|
|
|
stream_wrapper_register("wrap", "wrapper");
|
|
$fp = fopen("wrap://...", "r");
|
|
|
|
try {
|
|
feof($fp);
|
|
} catch (Throwable $e) {
|
|
echo $e::class, ': ', $e->getMessage(), PHP_EOL;
|
|
}
|
|
|
|
?>
|
|
--EXPECT--
|
|
Exception: cannot eof
|