blob: b69c6c557b5eec3d832e4862b5cbd82fa7e98d18 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
--TEST--
Bug #46426 (3rd parameter offset of stream_get_contents not works for "0")
--FILE--
<?php
$tmp = tmpfile();
fwrite($tmp, "12345");
echo stream_get_contents($tmp, 2, 1);
echo "\n";
echo stream_get_contents($tmp, -1);
echo "\n";
echo stream_get_contents($tmp, -1, 0);
echo "\n";
echo stream_get_contents($tmp, -1, 2);
echo "\n";
echo stream_get_contents($tmp, 0, 0);
echo "\n";
echo stream_get_contents($tmp, 1, 0);
echo "\n";
echo stream_get_contents($tmp, -1);
?>
--EXPECT--
23
45
12345
345
1
2345
|