ob_start_error_005.phpt 469 B

1234567891011121314151617181920212223
  1. --TEST--
  2. ob_start(): ensure buffers can't be added from within callback.
  3. --FILE--
  4. <?php
  5. /*
  6. * proto bool ob_start([ string|array user_function [, int chunk_size [, bool erase]]])
  7. * Function is implemented in main/output.c
  8. */
  9. function f($str) {
  10. ob_start();
  11. echo "hello";
  12. ob_end_flush();
  13. return $str;
  14. }
  15. var_dump(ob_start('f'));
  16. echo "done";
  17. ?>
  18. --EXPECTF--
  19. Fatal error: ob_start(): Cannot use output buffering in output buffering display handlers in %s on line 9