Return to ob_flush_basic_001.phpt CVS log | Up to [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / tests / output |
1.1 ! misho 1: --TEST-- ! 2: Test 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: ! 11: echo "*** Testing ob_flush() : basic functionality ***\n"; ! 12: ! 13: // Zero arguments ! 14: echo "\n-- Testing ob_flush() function with Zero arguments --\n"; ! 15: var_dump(ob_flush()); ! 16: ! 17: ob_start(); ! 18: echo "This should get flushed.\n"; ! 19: var_dump(ob_flush()); ! 20: ! 21: echo "Ensure the buffer is still active after the flush.\n"; ! 22: $out = ob_flush(); ! 23: var_dump($out); ! 24: ! 25: echo "Done"; ! 26: ! 27: ?> ! 28: --EXPECTF-- ! 29: *** Testing ob_flush() : basic functionality *** ! 30: ! 31: -- Testing ob_flush() function with Zero arguments -- ! 32: ! 33: Notice: ob_flush(): failed to flush buffer. No buffer to flush in %s on line 12 ! 34: bool(false) ! 35: This should get flushed. ! 36: bool(true) ! 37: Ensure the buffer is still active after the flush. ! 38: bool(true) ! 39: Done