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, "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?>
25--EXPECT--
2623
2745
2812345
29345
30
311
322345
33