3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $text = 'Título ú Nota ó !¡ ! '; $text = preg_replace('/[^a-zA-Z0-9, ]/i','',$text); echo $text; $data = "Thäre!wouldn't%bé#äny"; $new_data = str_replace ("'", "", $data); $new_data = preg_replace ('/[^\p{L}\p{N}]/u', '_', $new_data); var_dump ( $new_data );
Output for 4.4.0 - 4.4.9, 5.0.5 - 5.6.28, hhvm-3.10.0 - 3.13.2, 7.0.0 - 7.1.0
Ttulo Nota string(23) "Thäre_wouldnt_bé_äny"
Output for 4.3.11, 5.0.0 - 5.0.4
Ttulo Nota Warning: preg_replace(): Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 3 in /in/M2KPA on line 10 NULL
Output for 4.3.0 - 4.3.10
Ttulo Nota Warning: Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 3 in /in/M2KPA on line 10 NULL