3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?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 ); }
based on SMZcE
Output for 7.2.0
Doplňkov&eacute; služby Doplňkové služby Deprecated: Function create_function() is deprecated in /in/QKgh2 on line 27 Doplňkové služby
Output for 5.3.18 - 7.1.10
Doplňkov&eacute; služby Doplňkové služby Doplňkové služby