1--TEST--
2Bug #60455: stream_get_line and \0 as a delimiter
3--FILE--
4<?php
5class TestStream {
6    public $context;
7    private $s = 0;
8    function stream_open($path, $mode, $options, &$opened_path) {
9            return true;
10    }
11    function stream_read($count) {
12        if ($this->s++ == 0)
13            return "a\0";
14
15        return "";
16    }
17    function stream_eof() {
18        return $this->s >= 2;
19    }
20
21}
22
23stream_wrapper_register("test", "TestStream");
24
25$f = fopen("test://", "r");
26var_dump(stream_get_line($f, 100, "\0"));
27?>
28--EXPECT--
29string(1) "a"
30