3v4l.org

run code in 300+ PHP versions simultaneously
<?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{Meroitic_Cursive}\p{Meroitic_Hieroglyphs}\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 - 5.4.45, 5.5.24 - 5.5.35, 5.6.7 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.27, 8.2.0 - 8.2.17, 8.3.0 - 8.3.4
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 687 in /in/1pril on line 3
Output for 4.4.3 - 4.4.9, 5.1.3 - 5.1.6, 5.2.0 - 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/1pril on line 3
Output for 4.4.0 - 4.4.2, 5.0.5, 5.1.0 - 5.1.2
Warning: preg_replace(): Compilation failed: unknown property name after \P or \p at offset 11 in /in/1pril 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/1pril 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/1pril on line 3

preferences:
241.46 ms | 401 KiB | 338 Q