File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / tests / output / ob_get_length_basic_001.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_4_3elwix, v5_4_29p0, v5_4_29, v5_4_20p0, v5_4_20, v5_4_17p0, v5_4_17, v5_3_10, HEAD
php

    1: --TEST--
    2: Test return type and value, as well as basic behaviour, of ob_get_length()
    3: --FILE--
    4: <?php
    5: /* 
    6:  * proto int ob_get_length(void)
    7:  * Function is implemented in main/output.c
    8: */ 
    9: 
   10: echo "No output buffers\n";
   11: var_dump(ob_get_length());
   12: 
   13: ob_start();
   14: var_dump(ob_get_length());
   15: echo "hello\n";
   16: var_dump(ob_get_length());
   17: ob_flush();
   18: $value = ob_get_length();
   19: echo "hello\n";
   20: ob_clean();
   21: var_dump(ob_get_length());
   22: var_dump($value);
   23: ob_end_flush();
   24: 
   25: echo "No output buffers\n";
   26: var_dump(ob_get_length());
   27: ?>
   28: --EXPECTF--
   29: No output buffers
   30: bool(false)
   31: int(0)
   32: hello
   33: int(13)
   34: int(0)
   35: int(0)
   36: No output buffers
   37: bool(false)

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