3v4l.org

run code in 300+ PHP versions simultaneously
// Source - https://stackoverflow.com/q/79908777 // Posted by Sarah // Retrieved 2026-03-16, License - CC BY-SA 4.0 <?php $myString = "\x65\x92"; $isValidEncoding = mb_check_encoding($myString, 'UTF-8'); if(!$isValidEncoding){ //This code does successfully execute //since the string is not utf-8 encoding. echo "Invalid Encoding!"; } ?>
Output for git.master_jit, git.master
// Source - https://stackoverflow.com/q/79908777 // Posted by Sarah // Retrieved 2026-03-16, License - CC BY-SA 4.0 Invalid Encoding!

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
44.29 ms | 711 KiB | 4 Q