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