1--TEST--
2bzopen(): throw TypeError if filename contains null bytes
3--EXTENSIONS--
4bz2
5--FILE--
6<?php
7
8try {
9    bzopen("file\0", "w");
10} catch (TypeError $e) {
11    echo $e->getMessage() . \PHP_EOL;
12}
13
14try {
15    bzopen("file\0", "r");
16} catch (TypeError $e) {
17    echo $e->getMessage() . \PHP_EOL;
18}
19
20?>
21--EXPECT--
22bzopen(): Argument #1 ($file) must not contain null bytes
23bzopen(): Argument #1 ($file) must not contain null bytes
24