php IHDR w Q )Ba pHYs sRGB gAMA a IDATxMk\U s&uo,mD )Xw+e?tw.oWp;QHZnw`gaiJ9̟灙a=nl[ ʨ G;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ y H@E7j 1j+OFRg}ܫ;@Ea~ j`u'o> j- $_q?qS XzG'ay
files >> /opt/php-7.0.1/ext/standard/tests/streams/ |
files >> //opt/php-7.0.1/ext/standard/tests/streams/bug60455_04.phpt |
--TEST-- Bug #60455: stream_get_line and 1-line with maxlen size followed by 0-length read with EOL indication --FILE-- <?php class TestStream { private $s = 0; function stream_open($path, $mode, $options, &$opened_path) { return true; } function stream_read($count) { if ($this->s++ == 0) return "a\n"; return ""; } function stream_eof() { return $this->s >= 2; } } stream_wrapper_register("test", "TestStream"); $f = fopen("test://", "r"); while (!feof($f)) { $line = stream_get_line($f, 2, "\n"); var_dump($line); } --EXPECT-- string(1) "a" bool(false)y~or5J={Eeu磝Qk ᯘG{?+]ן?wM3X^歌>{7پK>on\jy Rg/=fOroNVv~Y+ NGuÝHWyw[eQʨSb> >}Gmx[o[<{Ϯ_qFvM IENDB`