Example 1 — Read the Internal Encoding
Print the current setting. This is typical for a UTF-8 server.
<?php
echo mb_internal_encoding(), PHP_EOL; How It Works
- Call it with no argument.
- It returns the current encoding name.
- On most servers this is
UTF-8. - Your server may show a different value if `php. ini` sets one.

