File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / tests / output / ob_start_error_002.phpt
Revision 1.1.1.2 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Tue May 29 12:34:34 2012 UTC (12 years, 1 month 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, HEAD
php 5.4.3+patches

    1: --TEST--
    2: Test wrong number of arguments and wrong arg types for ob_start()
    3: --FILE--
    4: <?php
    5: /* 
    6:  * proto bool ob_start([ string|array user_function [, int chunk_size [, bool erase]]])
    7:  * Function is implemented in main/output.c
    8: */ 
    9: 
   10: Class C {
   11: 	static function f($str) {
   12: 		return $str;
   13: 	}
   14: }
   15: 
   16: var_dump(ob_start(array("nonExistent","f")));
   17: var_dump(ob_start(array("C","nonExistent")));
   18: var_dump(ob_start("C::no"));
   19: var_dump(ob_start("no"));
   20: echo "done"
   21: ?>
   22: --EXPECTF--
   23: Warning: ob_start(): class 'nonExistent' not found in %s on line 13
   24: 
   25: Notice: ob_start(): failed to create buffer in %s on line 13
   26: bool(false)
   27: 
   28: Warning: ob_start(): class 'C' does not have a method 'nonExistent' in %s on line 14
   29: 
   30: Notice: ob_start(): failed to create buffer in %s on line 14
   31: bool(false)
   32: 
   33: Warning: ob_start(): class 'C' does not have a method 'no' in %s on line 15
   34: 
   35: Notice: ob_start(): failed to create buffer in %s on line 15
   36: bool(false)
   37: 
   38: Warning: ob_start(): function 'no' not found or invalid function name in %s on line 16
   39: 
   40: Notice: ob_start(): failed to create buffer in %s on line 16
   41: bool(false)
   42: done

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