1
0
mirror of https://github.com/php/php-src.git synced 2026-04-25 08:58:28 +02:00
Files
archived-php-src/tests/output/ob_start_error_001.phpt
T
2020-02-03 22:52:20 +01:00

30 lines
568 B
PHP

--TEST--
Test wrong number of arguments and wrong arg types for ob_start()
--FILE--
<?php
/*
* proto bool ob_start([ string|array user_function [, int chunk_size [, bool erase]]])
* Function is implemented in main/output.c
*/
function justPrint($str) {
return $str;
}
$arg_1 = "justPrint";
$arg_2 = 0;
$arg_3 = false;
$extra_arg = 1;
echo "\nArg 1 wrong type\n";
var_dump(ob_start(1.5));
?>
--EXPECTF--
Arg 1 wrong type
Warning: ob_start(): no array or string given in %s on line 17
Notice: ob_start(): Failed to create buffer in %s on line 17
bool(false)