Crash inside stream_get_line(), when length=0
--FILE--
<?php
-die("Temporary unavailable in unicode PHP. Remove this line.");
$path = dirname(__FILE__) . '/test.html';
-file_put_contents($path, "foo<br>bar<br>foo");
+file_put_contents($path, b"foo<br>bar<br>foo");
$fp = fopen($path, "r");
while ($fp && !feof($fp)) {
echo stream_get_line($fp, 0, "<br>")."\n";
/* store the data in a regular file so that we can compare
* the results */
$tf = tmpfile();
-fwrite($tf, $DATA);
+fwrite($tf, (binary)$DATA);
$n = ftell($tf);
rewind($tf) or die("failed to rewind tmp file!");
if (ftell($tf) != 0)
<?php
# vim600:syn=php:
-$text = "Hello There!";
+$text = b"Hello There!";
$filters = array("string.rot13", "string.toupper", "string.tolower");
function filter_test($names)