File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / tests / output / ob_017.phpt
Revision 1.1.1.3 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Mon Jul 22 01:32:14 2013 UTC (10 years, 11 months ago) by misho
Branches: php, MAIN
CVS tags: v5_4_29p0, v5_4_29, v5_4_20p0, v5_4_20, v5_4_17, HEAD
5.4.17

    1: --TEST--
    2: output buffering - stati
    3: --FILE--
    4: <?php
    5: $stati = array();
    6: function oh($str, $flags) {
    7: 	global $stati;
    8: 	$stati[] = "$flags: $str";
    9: 	return $str;
   10: }
   11: ob_start("oh", 3);
   12: echo "yes";
   13: echo "!\n";
   14: ob_flush();
   15: echo "no";
   16: ob_clean();
   17: echo "yes!\n";
   18: echo "no";
   19: ob_end_clean();
   20: print_r($stati);
   21: ?>
   22: --EXPECT--
   23: yes!
   24: yes!
   25: Array
   26: (
   27:     [0] => 1: yes
   28:     [1] => 4: !
   29: 
   30:     [2] => 2: no
   31:     [3] => 0: yes!
   32: 
   33:     [4] => 10: no
   34: )

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