3v4l.org

run code in 300+ PHP versions simultaneously
<?php function to_permalink($str) { if($str !== mb_convert_encoding( mb_convert_encoding($str, 'UTF-32', 'UTF-8'), 'UTF-8', 'UTF-32') ) $str = mb_convert_encoding($str, 'UTF-8', mb_detect_encoding($str)); $str = htmlentities($str, ENT_NOQUOTES, 'UTF-8'); $str = preg_replace('`&([a-z]{1,2})(acute|uml|circ|grave|ring|cedil|slash|tilde|caron|lig);`i', '\\1', $str); $str = html_entity_decode($str, ENT_NOQUOTES, 'UTF-8'); $str = preg_replace(array('`[^a-z0-9]`i','`[-]+`'), '-', $str); $str = strtolower( trim($str, '-') ); return $str; } $string = "andrés EFI收购Cretaprint"; echo to_permalink($string)."\n";
Output for git.master, git.master_jit, rfc.property-hooks
andres-efi-cretaprint

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