1--TEST--
2Calling bzerr* functions on non-bz2 streams
3--EXTENSIONS--
4bz2
5--FILE--
6<?php
7$f = fopen(__FILE__, 'r');
8try {
9    var_dump(bzerrno($f));
10} catch (TypeError $e) {
11    echo $e->getMessage(), "\n";
12}
13try {
14    var_dump(bzerrstr($f));
15} catch (TypeError $e) {
16    echo $e->getMessage(), "\n";
17}
18try {
19    var_dump(bzerror($f));
20} catch (TypeError $e) {
21    echo $e->getMessage(), "\n";
22}
23?>
24--EXPECT--
25bzerrno(): Argument #1 ($bz) must be a bz2 stream
26bzerrstr(): Argument #1 ($bz) must be a bz2 stream
27bzerror(): Argument #1 ($bz) must be a bz2 stream
28