File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / tests / output / ob_017.phpt
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Tue Feb 21 23:48:06 2012 UTC (12 years, 4 months ago) by misho
Branches: php, MAIN
CVS tags: v5_3_10, HEAD
php

    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] => 3: yes
   28:     [1] => 2: !
   29: 
   30:     [2] => 2: no
   31:     [3] => 2: yes!
   32: 
   33:     [4] => 4: no
   34: )

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