1--TEST--
2Test md5() function : error conditions
3--FILE--
4<?php
5/* Prototype  : string md5  ( string $str  [, bool $raw_output= false  ] )
6 * Description: Calculate the md5 hash of a string
7 * Source code: ext/standard/md5.c
8*/
9
10echo "*** Testing md5() : error conditions ***\n";
11
12echo "\n-- Testing md5() function with no arguments --\n";
13var_dump( md5());
14
15echo "\n-- Testing md5() function with more than expected no. of arguments --\n";
16$str = "Hello World";
17$raw_output = true;
18$extra_arg = 10;
19
20var_dump(md5($str, $raw_output, $extra_arg));
21?>
22===DONE==
23--EXPECTF--
24*** Testing md5() : error conditions ***
25
26-- Testing md5() function with no arguments --
27
28Warning: md5() expects at least 1 parameter, 0 given in %s on line %d
29NULL
30
31-- Testing md5() function with more than expected no. of arguments --
32
33Warning: md5() expects at most 2 parameters, 3 given in %s on line %d
34NULL
35===DONE==
36