xref: /PHP-7.4/ext/bz2/tests/with_files.phpt (revision d679f022)
1--TEST--
2BZ2 with files
3--SKIPIF--
4<?php if (!extension_loaded("bz2")) print "skip"; ?>
5--FILE--
6<?php
7
8error_reporting(E_ALL);
9
10$filename = "with_files.bz2";
11$str = "This is a test string.\n";
12$bz = bzopen($filename, "w");
13bzwrite($bz, $str);
14bzclose($bz);
15
16$bz = bzopen($filename, "r");
17print bzread($bz, 10);
18print bzread($bz);
19bzclose($bz);
20unlink($filename);
21--EXPECT--
22This is a test string.
23