3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = preg_replace('/[^\p{Arabic}\p{Armenian}\p{Avestan}\p{Balinese}\p{Bamum}\p{Bengali}\p{Bopomofo}\p{Braille}\p{Buginese}\p{Buhid}\p{Canadian_Aboriginal}\p{Carian}\p{Cham}\p{Cherokee}\p{Common}\p{Coptic}\p{Cuneiform}\p{Cypriot}\p{Cyrillic}\p{Deseret}\p{Devanagari}\p{Egyptian_Hieroglyphs}\p{Ethiopic}\p{Georgian}\p{Glagolitic}\p{Gothic}\p{Greek}\p{Gujarati}\p{Gurmukhi}\p{Han}\p{Hangul}\p{Hanunoo}\p{Hebrew}\p{Hiragana}\p{Imperial_Aramaic}\p{Inherited}\p{Inscriptional_Pahlavi}\p{Inscriptional_Parthian}\p{Javanese}\p{Kaithi}\p{Kannada}\p{Katakana}\p{Kayah_Li}\p{Kharoshthi}\p{Khmer}\p{Lao}\p{Latin}\p{Lepcha}\p{Limbu}\p{Linear_B}\p{Lisu}\p{Lycian}\p{Lydian}\p{Malayalam}\p{Meetei_Mayek}\p{Miao}\p{Mongolian}\p{Myanmar}\p{New_Tai_Lue}\p{Nko}\p{Ogham}\p{Old_Italic}\p{Old_Persian}\p{Old_South_Arabian}\p{Old_Turkic}\p{Ol_Chiki}\p{Oriya}\p{Osmanya}\p{Phags_Pa}\p{Phoenician}\p{Rejang}\p{Runic}\p{Samaritan}\p{Saurashtra}\p{Sharada}\p{Shavian}\p{Sinhala}\p{Sora_Sompeng}\p{Sundanese}\p{Syloti_Nagri}\p{Syriac}\p{Tagalog}\p{Tagbanwa}\p{Tai_Le}\p{Tai_Tham}\p{Tai_Viet}\p{Takri}\p{Tamil}\p{Telugu}\p{Thaana}\p{Thai}\p{Tibetan}\p{Tifinagh}\p{Ugaritic}\p{Vai}\p{Yi}\-\.]/u', '-', 'machin');
Output for 5.3.19 - 5.3.29, 5.4.9 - 7.1.0
Output for 5.2.14 - 5.2.17, 5.3.3 - 5.3.18, 5.4.0 - 5.4.8
Warning: preg_replace(): Compilation failed: unknown property name after \P or \p at offset 675 in /in/cJC8Y on line 3
Output for 4.4.3 - 4.4.9, 5.1.3 - 5.2.13, 5.3.0 - 5.3.2
Warning: preg_replace(): Compilation failed: unknown property name after \P or \p at offset 34 in /in/cJC8Y on line 3
Output for 4.4.0 - 4.4.2, 5.0.5 - 5.1.2
Warning: preg_replace(): Compilation failed: unknown property name after \P or \p at offset 11 in /in/cJC8Y on line 3
Output for 4.3.11, 5.0.0 - 5.0.4
Warning: preg_replace(): Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 3 in /in/cJC8Y on line 3
Output for 4.3.0 - 4.3.10
Warning: Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 3 in /in/cJC8Y on line 3