3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $string = "D1F21aILKJ989++J0lkh908-88#022l2l1mnbb2324"; preg_match_all('/\pL|\d+/', $string, $array); print_r($array);
based on bmnm2
Output for 4.4.0 - 4.4.9, 5.0.5 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Array ( [0] => Array ( [0] => D [1] => 1 [2] => F [3] => 21 [4] => a [5] => I [6] => L [7] => K [8] => J [9] => 989 [10] => J [11] => 0 [12] => l [13] => k [14] => h [15] => 908 [16] => 88 [17] => 022 [18] => l [19] => 2 [20] => l [21] => 1 [22] => m [23] => n [24] => b [25] => b [26] => 2324 ) )
Output for 4.3.11, 5.0.0 - 5.0.4
Warning: preg_match_all(): Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 1 in /in/ibLh2 on line 3 Array ( )
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 1 in /in/ibLh2 on line 3 Array ( )