File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / tests / output / ob_015.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: output buffering - failure
    3: --FILE--
    4: <?php
    5: ob_start("str_rot13", 1);
    6: echo "foo\n";
    7: // str_rot13 expects 1 param and returns NULL when passed 2 params.
    8: // It is invoked with 2 params when used as an OB callback.
    9: // Therefore, there will be no data in the buffer. This is expected: see bug 46900.
   10: ob_end_flush();
   11: 
   12: // Show the error.
   13: print_r(error_get_last());
   14: ?>
   15: --EXPECTF--
   16: Array
   17: (
   18:     [type] => 2
   19:     [message] => str_rot13() expects exactly 1 parameter, 2 given
   20:     [file] => %s
   21:     [line] => 7
   22: )

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