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