3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $search = array( ' ', 'ą', 'ć', 'ę', 'ł', 'ń', 'ó', 'ś', 'ż', 'ź', 'Ą', 'Ć', 'Ę', 'Ł', 'Ń', 'Ó', 'Ś', 'Ż', 'Ź', ); $replace = array( '-', 'a', 'c', 'e', 'l', 'n', 'o', 's', 'z', 'z', 'A', 'C', 'E', 'L', 'N', 'O', 'S', 'Z', 'Z', ); $str = 'Zażółć gęślą jaźń pupo 010241 90Ś '; $str = str_replace($search, $replace, $str); echo $str;
based on 8kL6b
Output for 4.3.0 - 7.2.0
Zazolc-gesla-jazn-pupo-010241-90S----------