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(10) { [0]=> string(15) "(Типовые" [1]=> string(2) ") " [2]=> string(14) "примеры" [3]=> string(1) " " [4]=> string(14) "раннего" [5]=> string(1) " " [6]=> string(10) "этапа" [7]=> string(1) " " [8]=> string(20) "применения" [9]=> string(1) " " }