3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php preg_match_all('#\w#u','سیب',$f); var_dump($f); preg_match_all('#\pL#u','سیب',$f); var_dump($f);
Output for 5.3.4 - 7.1.0
array(1) { [0]=> array(3) { [0]=> string(2) "س" [1]=> string(2) "ی" [2]=> string(2) "ب" } } array(1) { [0]=> array(3) { [0]=> string(2) "س" [1]=> string(2) "ی" [2]=> string(2) "ب" } }
Output for 4.4.0 - 4.4.9, 5.0.5 - 5.3.3
array(1) { [0]=> array(0) { } } array(1) { [0]=> array(3) { [0]=> string(2) "س" [1]=> string(2) "ی" [2]=> string(2) "ب" } }
Output for 4.3.11, 5.0.0 - 5.0.4
array(1) { [0]=> array(0) { } } Warning: preg_match_all(): Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 1 in /in/RiNA0 on line 5 array(0) { }
Output for 4.3.0 - 4.3.10
array(1) { [0]=> array(0) { } } Warning: Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 1 in /in/RiNA0 on line 5 array(0) { }