1--TEST--
2Test base64_encode() function : error conditions - wrong number of args
3--FILE--
4<?php
5/* Prototype  : proto string base64_encode(string str)
6 * Description: Encodes string using MIME base64 algorithm
7 * Source code: ext/standard/base64.c
8 * Alias to functions:
9 */
10
11echo "*** Testing base64_encode() : error conditions - wrong number of args ***\n";
12
13// Zero arguments
14echo "\n-- Testing base64_encode() function with Zero arguments --\n";
15var_dump( base64_encode() );
16
17//Test base64_encode with one more than the expected number of arguments
18echo "\n-- Testing base64_encode() function with more than expected no. of arguments --\n";
19$str = 'string_val';
20$extra_arg = 10;
21var_dump( base64_encode($str, $extra_arg) );
22
23echo "Done";
24?>
25--EXPECTF--
26*** Testing base64_encode() : error conditions - wrong number of args ***
27
28-- Testing base64_encode() function with Zero arguments --
29
30Warning: base64_encode() expects exactly 1 parameter, 0 given in %s on line 12
31NULL
32
33-- Testing base64_encode() function with more than expected no. of arguments --
34
35Warning: base64_encode() expects exactly 1 parameter, 2 given in %s on line 18
36NULL
37Done