3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo "Coss&eacute"; echo utf8_decode("Coss&eacute"); echo iconv("ASCII","UTF-8//TRANSLIT","Coss&eacute"); $in_utf8encoded = "é à ù è ò"; // first you need the convert the string to the charset you want... $in_iso8859encoded = iconv("UTF-8", "ISO-8859-1", $in_utf8encoded); // ...in order to make htmlentities work with the same charset $out_iso8859= htmlentities($in_iso8859encoded, ENT_COMPAT, "ISO-8859-1"); // then only to display in your page, revert it back to utf-8 echo iconv("ISO-8859-1", "UTF-8", $out_iso8859);
Output for git.master, git.master_jit, rfc.property-hooks
Coss&eacute Deprecated: Function utf8_decode() is deprecated in /in/rCPI2 on line 3 Coss&eacuteCoss&eacute Warning: iconv(): Wrong encoding, conversion from "UTF-8" to "ISO-8859-1" is not allowed in /in/rCPI2 on line 9 Warning: iconv(): Wrong encoding, conversion from "ISO-8859-1" to "UTF-8" is not allowed in /in/rCPI2 on line 15

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:
41.27 ms | 402 KiB | 8 Q