3 /* Prototype : string rtrim ( string $str [, string $charlist ] )
4 * Description: Strip whitespace (or other characters) from the end of a string.
5 * Source code: ext/standard/string.c
8 echo "*** Testing rtrim() function: with unexpected inputs for 'str' argument ***\n";
10 //get an unset variable
11 $unset_var = ' !--string_val--! ';
16 public function __toString() {
17 return " !---sample object---! ";
21 //getting the resource
22 $file_handle = fopen(__FILE__
, "r");
24 // array with different values for $input
62 /*21*/ @$undefined_var,
68 // loop through with each element of the $inputs array to test rtrim() function
70 foreach($inputs as $input) {
71 echo "-- Iteration $count --\n";
72 // strip white space and any "minus" signs
73 var_dump( rtrim($input, " !-") );
77 fclose($file_handle); //closing the file handle