3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php echo preg_match('/\b\pL{2,4}\b/ui', 'очень длинные слова'); echo preg_match('/\b\pL{2,4}\b/ui', 'тут короткие слова'); echo preg_replace('/\w{2,4}/ui', '<$0>', 'оче-нь тут слова');
Output for 5.3.4 - 7.1.0
01<оче>-<нь> <тут> <слов>а
Output for 4.4.0 - 4.4.9, 5.0.5 - 5.3.3
00оче-нь тут слова
Output for 4.3.11, 5.0.0 - 5.0.4
Warning: preg_match(): Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 3 in /in/KkTHr on line 2 Warning: preg_match(): Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 3 in /in/KkTHr 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/KkTHr on line 2 Warning: Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 3 in /in/KkTHr on line 3 оче-нь тут слова