3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = "Doplňkové služby"; $e = htmlentities($str, ENT_COMPAT, "UTF-8"); $d = html_entity_decode($e, ENT_COMPAT, "UTF-8"); print_r($e); echo "\n"; print_r($d); echo "\n\n"; $ee = _decodeAccented($e); print_r($ee); function _decodeAccented($encodedValue, $options = array()) { $options += array( 'quote' => ENT_NOQUOTES, 'encoding' => 'UTF-8', ); return preg_replace_callback( '/&\w(acute|uml|tilde);/', create_function( '$m', 'return html_entity_decode($m[0], ' . $options['quote'] . ', "' . $options['encoding'] . '");' ), $encodedValue ); }
Output for git.master, git.master_jit, rfc.property-hooks
Doplňkov&eacute; služby Doplňkové služby Fatal error: Uncaught Error: Call to undefined function create_function() in /in/QKgh2:24 Stack trace: #0 /in/QKgh2(13): _decodeAccented('Dopl\xC5\x88kov&eacut...') #1 {main} thrown in /in/QKgh2 on line 24
Process exited with code 255.

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:
54.21 ms | 401 KiB | 8 Q