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