1--TEST-- 2Test ob_flush() function : basic functionality 3--FILE-- 4<?php 5/* Prototype : proto bool ob_flush(void) 6 * Description: Flush (send) contents of the output buffer. The last buffer content is sent to next buffer 7 * Source code: main/output.c 8 * Alias to functions: 9 */ 10 11echo "*** Testing ob_flush() : basic functionality ***\n"; 12 13// Zero arguments 14echo "\n-- Testing ob_flush() function with Zero arguments --\n"; 15var_dump(ob_flush()); 16 17ob_start(); 18echo "This should get flushed.\n"; 19var_dump(ob_flush()); 20 21echo "Ensure the buffer is still active after the flush.\n"; 22$out = ob_flush(); 23var_dump($out); 24 25echo "Done"; 26 27?> 28--EXPECTF-- 29*** Testing ob_flush() : basic functionality *** 30 31-- Testing ob_flush() function with Zero arguments -- 32 33Notice: ob_flush(): failed to flush buffer. No buffer to flush in %s on line 12 34bool(false) 35This should get flushed. 36bool(true) 37Ensure the buffer is still active after the flush. 38bool(true) 39Done 40