bug27619.phpt 437 B

123456789101112131415161718
  1. --TEST--
  2. Bug #27619 (filters not applied to pre-buffered data)
  3. --FILE--
  4. <?php
  5. $fp = tmpfile();
  6. fwrite($fp, "this is a lowercase string.\n");
  7. rewind($fp);
  8. /* Echo out the first four bytes 'this' without applying filter
  9. Remainder will get sucked into the read buffer though. */
  10. echo fread($fp, 4);
  11. stream_filter_append($fp, "string.toupper");
  12. fpassthru($fp);
  13. ?>
  14. --EXPECT--
  15. this IS A LOWERCASE STRING.