3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $subject="/hello/カメラ/"; $pattern='#^/hello/([\p{Han}\p{Katakana}\p{Hiragana}\w\-]+)/#u'; $result=preg_match($pattern,$subject); echo $result; // 1 $subject="/hello/カレンダー/"; $pattern='#^/hello/([\p{Han}\p{Katakana}\p{Hiragana}\w\-]+)/#u'; $result=preg_match($pattern,$subject); echo $result; // 0
Output for 5.3.4 - 7.2.6, 7.3.0beta1 - 7.3.0rc4
11
Output for 4.4.3 - 4.4.9, 5.1.3 - 5.3.3, 7.3.0alpha1
10
Output for 4.4.0 - 4.4.2, 5.0.5, 5.1.1 - 5.1.2
Warning: preg_match(): Compilation failed: unknown property name after \P or \p at offset 16 in /in/frX5U on line 4 Warning: preg_match(): Compilation failed: unknown property name after \P or \p at offset 16 in /in/frX5U on line 9
Output for 5.1.0
Fatal error: fatal flex scanner internal error--end of buffer missed in /in/frX5U on line 10
Process exited with code 255.
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 11 in /in/frX5U on line 4 Warning: preg_match(): Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 11 in /in/frX5U on line 9
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 11 in /in/frX5U on line 4 Warning: Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 11 in /in/frX5U on line 9