Lines Matching refs:trim
2 Test trim() function : error conditions
6 /* Prototype : string trim ( string $str [, string $charlist ] )
12 echo "*** Testing trim() : error conditions ***\n";
14 echo "\n-- Testing trim() function with no arguments --\n";
15 var_dump( trim() );
17 echo "\n-- Testing trim() function with more than expected no. of arguments --\n";
19 var_dump( trim("Hello World", "Heo", $extra_arg) );
23 echo "\n-- Test trim function with various invalid charlists --\n";
24 var_dump(trim($hello, "..a"));
25 var_dump(trim($hello, "a.."));
26 var_dump(trim($hello, "z..a"));
27 var_dump(trim($hello, "a..b..c"));
32 *** Testing trim() : error conditions ***
34 -- Testing trim() function with no arguments --
36 Warning: trim() expects at least 1 parameter, 0 given in %s on line %d
39 -- Testing trim() function with more than expected no. of arguments --
41 Warning: trim() expects at most 2 parameters, 3 given in %s on line %d
44 -- Test trim function with various invalid charlists --
46 Warning: trim(): Invalid '..'-range, no character to the left of '..' in %s on line %d
50 Warning: trim(): Invalid '..'-range, no character to the right of '..' in %s on line %d
54 Warning: trim(): Invalid '..'-range, '..'-range needs to be incrementing in %s on line %d
58 Warning: trim(): Invalid '..'-range in %s on line %d