File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / ext / standard / tests / general_functions / ob_get_flush_error.phpt
Revision 1.1.1.2 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Tue May 29 12:34:44 2012 UTC (12 years, 1 month ago) by misho
Branches: php, MAIN
CVS tags: v5_4_3elwix, v5_4_29p0, v5_4_29, v5_4_20p0, v5_4_20, v5_4_17p0, v5_4_17, HEAD
php 5.4.3+patches

--TEST--
Test ob_get_flush() function : error conditions 
--INI--
output_buffering=0
--FILE--
<?php
/* Prototype  : bool ob_get_flush(void)
 * Description: Get current buffer contents, flush (send) the output buffer, and delete current output buffer 
 * Source code: main/output.c
 * Alias to functions: 
 */

echo "*** Testing ob_get_flush() : error conditions ***\n";

// One extra argument
$extra_arg = 10;
var_dump( ob_get_flush( $extra_arg ) );

// No ob_start() executed
var_dump( ob_get_flush() );

?>
===DONE===
--EXPECTF--
*** Testing ob_get_flush() : error conditions ***

Warning: ob_get_flush() expects exactly 0 parameters, 1 given in %s on line %d
NULL

Notice: ob_get_flush(): failed to delete and flush buffer. No buffer to delete or flush in %s on line %d
bool(false)
===DONE===

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>