Updates to Tomato RAF including NGINX && PHP
[tomato.git] / release / src / router / php / ext / standard / tests / streams / bug46426.phpt
blob80dbcded800028e9e1e5b104af5eca0bdd016e15
1 --TEST--
2 Bug #46426 (3rd parameter offset of stream_get_contents not works for "0")
3 --FILE--
4 <?php
6 $tmp = tmpfile();
8 fwrite($tmp, b"12345");
10 echo stream_get_contents($tmp, 2, 1);
11 echo "\n";
12 echo stream_get_contents($tmp, -1);
13 echo "\n";
14 echo stream_get_contents($tmp, -1, 0);
15 echo "\n";
16 echo stream_get_contents($tmp, -1, 2);
17 echo "\n";
18 echo stream_get_contents($tmp, 0, 0);
19 echo "\n";
20 echo stream_get_contents($tmp, 1, 0);
21 echo "\n";
22 echo stream_get_contents($tmp, -1);
24 @unlink($tmp);
27 --EXPECT--
30 12345
31 345
34 2345