1--TEST--
2Test function_exists() function : error conditions
3--FILE--
4<?php
5/*
6 * proto bool function_exists(string function_name)
7 * Function is implemented in Zend/zend_builtin_functions.c
8*/
9
10echo "*** Testing function_exists() : error conditions ***\n";
11
12$arg_0 = "ABC";
13$extra_arg = 1;
14
15echo "\nToo many arguments\n";
16var_dump(function_exists($arg_0, $extra_arg));
17
18echo "\nToo few arguments\n";
19var_dump(function_exists());
20
21?>
22===Done===
23--EXPECTF--
24*** Testing function_exists() : error conditions ***
25
26Too many arguments
27
28Warning: function_exists() expects exactly 1 parameter, 2 given in %s on line %d
29NULL
30
31Too few arguments
32
33Warning: function_exists() expects exactly 1 parameter, 0 given in %s on line %d
34NULL
35===Done===
36