3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $query = "(Типовые) примеры раннего этапа применения "; $words = preg_split("/([^,.\'\":;!?\(\)\n\r\s]+?)/", $query, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY); var_dump($words);
Output for 4.3.0 - 7.1.0
array(78) { [0]=> string(1) "(" [1]=> string(1) "�" [2]=> string(1) "�" [3]=> string(1) "�" [4]=> string(1) "�" [5]=> string(1) "�" [6]=> string(1) "�" [7]=> string(1) "�" [8]=> string(1) "�" [9]=> string(1) "�" [10]=> string(1) "�" [11]=> string(1) "�" [12]=> string(1) "�" [13]=> string(1) "�" [14]=> string(1) "�" [15]=> string(2) ") " [16]=> string(1) "�" [17]=> string(1) "�" [18]=> string(1) "�" [19]=> string(1) "�" [20]=> string(1) "�" [21]=> string(1) "�" [22]=> string(1) "�" [23]=> string(1) "�" [24]=> string(1) "�" [25]=> string(1) "�" [26]=> string(1) "�" [27]=> string(1) "�" [28]=> string(1) "�" [29]=> string(1) "�" [30]=> string(1) " " [31]=> string(1) "�" [32]=> string(1) "�" [33]=> string(1) "�" [34]=> string(1) "�" [35]=> string(1) "�" [36]=> string(1) "�" [37]=> string(1) "�" [38]=> string(1) "�" [39]=> string(1) "�" [40]=> string(1) "�" [41]=> string(1) "�" [42]=> string(1) "�" [43]=> string(1) "�" [44]=> string(1) "�" [45]=> string(1) " " [46]=> string(1) "�" [47]=> string(1) "�" [48]=> string(1) "�" [49]=> string(1) "�" [50]=> string(1) "�" [51]=> string(1) "�" [52]=> string(1) "�" [53]=> string(1) "�" [54]=> string(1) "�" [55]=> string(1) "�" [56]=> string(1) " " [57]=> string(1) "�" [58]=> string(1) "�" [59]=> string(1) "�" [60]=> string(1) "�" [61]=> string(1) "�" [62]=> string(1) "�" [63]=> string(1) "�" [64]=> string(1) "�" [65]=> string(1) "�" [66]=> string(1) "�" [67]=> string(1) "�" [68]=> string(1) "�" [69]=> string(1) "�" [70]=> string(1) "�" [71]=> string(1) "�" [72]=> string(1) "�" [73]=> string(1) "�" [74]=> string(1) "�" [75]=> string(1) "�" [76]=> string(1) "�" [77]=> string(1) " " }