1--TEST--
2Test ob_get_length() function : basic functionality
3--INI--
4output_buffering=0
5--FILE--
6<?php
7/* Prototype  : int ob_get_length(void)
8 * Description: Return the length of the output buffer
9 * Source code: main/output.c
10 * Alias to functions:
11 */
12
13function dump_string_length( $string )
14{
15	ob_start();
16	echo $string;
17	$len = ob_get_length();
18	ob_end_clean();
19	var_dump( $len );
20}
21
22echo "*** Testing ob_get_length() : basic functionality ***\n";
23
24// No buffering active
25var_dump( ob_get_length() );
26
27dump_string_length( 'foo bar length of a string' );
28dump_string_length( 'plus one' );
29dump_string_length( "\0" );
30dump_string_length( '            lsf' );
31dump_string_length( '' );
32dump_string_length( null );
33
34// Extra argument
35var_dump( ob_get_length( 'foobar' ) );
36
37?>
38===DONE===
39--EXPECTF--
40*** Testing ob_get_length() : basic functionality ***
41bool(false)
42int(26)
43int(8)
44int(1)
45int(15)
46int(0)
47int(0)
48
49Warning: ob_get_length() expects exactly 0 parameters, 1 given in %s on line %d
50NULL
51===DONE===
52