--TEST-- GH-21799: phar_stream_close propagates phar_stream_flush return value --EXTENSIONS-- phar --INI-- phar.readonly=0 phar.require_hash=0 --FILE-- addFromString('hello.txt', 'hello'); unset($phar); $fp = fopen('phar://' . $fname . '/hello.txt', 'rb'); $content = fread($fp, 1024); $result = fclose($fp); echo $content . "\n"; var_dump($result); echo "no crash\n"; ?> --CLEAN-- --EXPECT-- hello bool(true) no crash