3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php preg_match_all('#\w#u','işşişillıu',$f); var_dump($f); preg_match_all('#\pL#u','سیب',$f); var_dump($f);
Output for 5.3.4 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
array(1) { [0]=> array(10) { [0]=> string(1) "i" [1]=> string(2) "ş" [2]=> string(2) "ş" [3]=> string(1) "i" [4]=> string(2) "ş" [5]=> string(1) "i" [6]=> string(1) "l" [7]=> string(1) "l" [8]=> string(2) "ı" [9]=> string(1) "u" } } 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(6) { [0]=> string(1) "i" [1]=> string(1) "i" [2]=> string(1) "i" [3]=> string(1) "l" [4]=> string(1) "l" [5]=> string(1) "u" } } 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(6) { [0]=> string(1) "i" [1]=> string(1) "i" [2]=> string(1) "i" [3]=> string(1) "l" [4]=> string(1) "l" [5]=> string(1) "u" } } Warning: preg_match_all(): Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 1 in /in/FopR7 on line 5 array(0) { }
Output for 4.3.0 - 4.3.10
array(1) { [0]=> array(6) { [0]=> string(1) "i" [1]=> string(1) "i" [2]=> string(1) "i" [3]=> string(1) "l" [4]=> string(1) "l" [5]=> string(1) "u" } } Warning: Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 1 in /in/FopR7 on line 5 array(0) { }