iconv_get_encoding

(PHP 4 >= 4.0.5, PHP 5, PHP 7)
Retrieve internal configuration variables of iconv extension
mixed iconv_get_encoding ([ string $type = "all" ] )

Retrieve internal configuration variables of iconv extension.

Parameters:
type

The value of the optional type can be:

  • all
  • input_encoding
  • output_encoding
  • internal_encoding
Returns:

Returns the current value of the internal configuration variable if successful or FALSE on failure.

If type is omitted or set to "all", iconv_get_encoding() returns an array that stores all these variables.

Examples:
iconv_get_encoding() example
<pre>
<?php
iconv_set_encoding("internal_encoding", "UTF-8");
iconv_set_encoding("output_encoding", "ISO-8859-1");
var_dump(iconv_get_encoding('all'));
?>
</pre>

The above example will output:

Array
(
    [input_encoding] => ISO-8859-1
    [output_encoding] => ISO-8859-1
    [internal_encoding] => UTF-8
)

See also:

iconv_set_encoding() -

ob_iconv_handler() -

doc_php
2016-02-24 15:57:11
Comments
Leave a Comment

Please login to continue.