xref: /PHP-7.0/ext/standard/tests/math/cos_error.phpt (revision d44f4cb1)
1--TEST--
2Test wrong number of arguments for cos()
3--FILE--
4<?php
5/*
6 * proto float cos(float number)
7 * Function is implemented in ext/standard/math.c
8*/
9
10$arg_0 = 1.0;
11$extra_arg = 1;
12
13echo "\nToo many arguments\n";
14var_dump(cos($arg_0, $extra_arg));
15
16echo "\nToo few arguments\n";
17var_dump(cos());
18
19?>
20--EXPECTF--
21Too many arguments
22
23Warning: cos() expects exactly 1 parameter, 2 given in %s on line %d
24NULL
25
26Too few arguments
27
28Warning: cos() expects exactly 1 parameter, 0 given in %s on line %d
29NULL
30