Allow duplicate items in encoded urls
[hiphop-php.git] / hphp / test / slow / ext_stream / stream_get_line_returnvalue.php
bloba7c52cdd8b213b2d3d851035077dce8af65c9d14
1 <?php
2 echo "<pre>";
3 test("one\n\nthree\nfour");
4 test("one\n\nthree\nfour\n");
5 test("\ntwo\nthree\nfour");
6 test("\ntwo\nthree\nfour\n");
7 test("one\ntwo\n\n\n");
9 function test($string) {
10 $stream = fopen('php://memory', 'r+');
11 fwrite($stream, $string);
12 rewind($stream);
14 for ($i = 0; $i < 6; $i ++) {
15 $line = stream_get_line($stream, 666, "\n");
16 echo "$i" . (feof($stream) ? ' (eof)' : '') . ": ";
17 var_dump($line);
19 echo "\n";