1--TEST--
2Test 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
10function justPrint($str) {
11	return $str;
12}
13
14$arg_1 = "justPrint";
15$arg_2 = 0;
16$arg_3 = false;
17$extra_arg = 1;
18
19echo "\n- Too many arguments\n";
20var_dump(ob_start($arg_1, $arg_2, $arg_3, $extra_arg));
21
22echo "\n- Arg 1 wrong type\n";
23var_dump(ob_start(1.5));
24
25echo "\n- Arg 2 wrong type\n";
26var_dump(ob_start("justPrint", "this should be an int"));
27
28echo "\n- Arg 3 wrong type\n";
29var_dump(ob_start("justPrint", 0, "this should be a bool"));
30
31?>
32--EXPECTF--
33
34- Too many arguments
35
36Warning: ob_start() expects at most 3 parameters, 4 given in %s on line 17
37NULL
38
39- Arg 1 wrong type
40bool(true)
41
42- Arg 2 wrong type
43
44Warning: ob_start() expects parameter 2 to be long, string given in %s on line 23
45NULL
46
47- Arg 3 wrong type
48bool(true)