1--TEST--
2bzopen(): throw TypeError if filename contains null bytes
3--SKIPIF--
4<?php if (!extension_loaded("bz2")) print "skip"; ?>
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