1--TEST--
2Bug #46426 (3rd parameter offset of stream_get_contents not works for "0")
3--FILE--
4<?php
5
6$tmp = tmpfile();
7
8fwrite($tmp, b"12345");
9
10echo stream_get_contents($tmp, 2, 1);
11echo "\n";
12echo stream_get_contents($tmp, -1);
13echo "\n";
14echo stream_get_contents($tmp, -1, 0);
15echo "\n";
16echo stream_get_contents($tmp, -1, 2);
17echo "\n";
18echo stream_get_contents($tmp, 0, 0);
19echo "\n";
20echo stream_get_contents($tmp, 1, 0);
21echo "\n";
22echo stream_get_contents($tmp, -1);
23
24@unlink($tmp);
25
26?>
27--EXPECT--
2823
2945
3012345
31345
32
331
342345
35