ob_end_flush_basic_001.phpt 969 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. --TEST--
  2. Test ob_end_flush() function : basic functionality
  3. --FILE--
  4. <?php
  5. /* Prototype : proto bool ob_end_flush(void)
  6. * Description: Flush (send) the output buffer, and delete current output buffer
  7. * Source code: main/output.c
  8. * Alias to functions:
  9. */
  10. echo "*** Testing ob_end_flush() : basic functionality ***\n";
  11. // Zero arguments
  12. echo "\n-- Testing ob_end_flush() function with Zero arguments --\n";
  13. var_dump(ob_end_flush());
  14. ob_start();
  15. var_dump(ob_end_flush());
  16. ob_start();
  17. echo "Hello\n";
  18. var_dump(ob_end_flush());
  19. var_dump(ob_end_flush());
  20. echo "Done";
  21. ?>
  22. --EXPECTF--
  23. *** Testing ob_end_flush() : basic functionality ***
  24. -- Testing ob_end_flush() function with Zero arguments --
  25. Notice: ob_end_flush(): failed to delete and flush buffer. No buffer to delete or flush in %s on line 12
  26. bool(false)
  27. bool(true)
  28. Hello
  29. bool(true)
  30. Notice: ob_end_flush(): failed to delete and flush buffer. No buffer to delete or flush in %s on line 21
  31. bool(false)
  32. Done