ob_implicit_flush_basic_002.phpt 959 B

1234567891011121314151617181920212223242526272829
  1. --TEST--
  2. Test ob_implicit_flush() function : ensure implicit flushing does not apply to user buffers.
  3. --FILE--
  4. <?php
  5. /* Prototype : proto void ob_implicit_flush([int flag])
  6. * Description: Turn implicit flush on/off and is equivalent to calling flush() after every output call
  7. * Source code: main/output.c
  8. * Alias to functions:
  9. */
  10. echo "*** Testing ob_implicit_flush() : ensure implicit flushing does not apply to user buffers. ***\n";
  11. // Start a user buffer
  12. ob_start();
  13. // Switch on implicit flushing.
  14. ob_implicit_flush(1);
  15. echo "This is being written to a user buffer.\n";
  16. echo "Note that even though implicit flushing is on, you should never see this,\n";
  17. echo "because implicit flushing affects only the top level buffer, not user buffers.\n";
  18. // Wipe the user buffer. Nothing should have been flushed.
  19. ob_end_clean();
  20. echo "Done";
  21. ?>
  22. --EXPECT--
  23. *** Testing ob_implicit_flush() : ensure implicit flushing does not apply to user buffers. ***
  24. Done