mirror of
https://github.com/php/php-src.git
synced 2026-04-24 16:38:25 +02:00
56f90492d6
For rationale, see https://github.com/php/php-src/pull/6787 Extensions migrated in this part: * bcmath * bz2 * calendar * com_dotnet * ctype Closes GH-6797.
25 lines
418 B
PHP
25 lines
418 B
PHP
--TEST--
|
|
Bug #51997 (SEEK_CUR with 0 value, returns a warning)
|
|
--EXTENSIONS--
|
|
bz2
|
|
--FILE--
|
|
<?php
|
|
|
|
error_reporting(E_ALL);
|
|
|
|
$filename = "bug51997.bz2";
|
|
$str = "This is a test string.\n";
|
|
$bz = bzopen($filename, "w");
|
|
bzwrite($bz, $str);
|
|
bzclose($bz);
|
|
|
|
$bz = bzopen($filename, "r");
|
|
fseek($bz, 0, SEEK_CUR);
|
|
print bzread($bz, 10);
|
|
print bzread($bz);
|
|
bzclose($bz);
|
|
unlink($filename);
|
|
?>
|
|
--EXPECT--
|
|
This is a test string.
|