File:
[ELWIX - Embedded LightWeight unIX -] /
embedaddon /
php /
ext /
standard /
tests /
array /
max_error.phpt
Revision
1.1.1.1 (vendor branch):
download - view:
text,
annotated -
select for diffs -
revision graph
Tue Feb 21 23:48:03 2012 UTC (12 years, 6 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
--TEST--
Test wrong number of arguments for min()
--FILE--
<?php
/*
* proto mixed min(mixed arg1 [, mixed arg2 [, mixed ...]])
* Function is implemented in ext/standard/array.c
*/
echo "\n*** Testing Error Conditions ***\n";
var_dump(max());
var_dump(max(1));
var_dump(max(array()));
var_dump(max(new stdclass));
?>
--EXPECTF--
*** Testing Error Conditions ***
Warning: max() expects at least 1 parameter, 0 given in %s on line 10
NULL
Warning: max(): When only one parameter is given, it must be an array in %s on line 11
NULL
Warning: max(): Array must contain at least one element in %s on line 12
bool(false)
Warning: max(): When only one parameter is given, it must be an array in %s on line 13
NULL
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>