2 /* Prototype : mixed iconv_get_encoding([string type])
3 * Description: Get internal encoding and output encoding for ob_iconv_handler()
4 * Source code: ext/iconv/iconv.c
8 * Test Error functionality of iconv_get_encoding
11 echo "*** Testing iconv_get_encoding() : error functionality ***\n";
13 //get an unset variable
20 public function __toString() {
30 // get a resource variable
31 $fp = fopen(__FILE__
, "r");
33 // unexpected values to be passed to $encoding argument
63 // invalid string data
72 /*22*/ @$undefined_var,
81 // loop through each element of $inputs to check the behavior of mb_regex_encoding()
83 foreach($inputs as $input) {
84 echo "\n-- Iteration $iterator --\n";
85 try { var_dump( iconv_get_encoding($input) ); } catch (Exception
$e) { echo "\n".'Warning: '.$e->getMessage().' in '.__FILE__
.' on line '.__LINE__
."\n"; }