<?php $str = 'Это "самая лучшая" строка'; $words = preg_split('~[\h\pP]+~u', $str); var_dump($words);
Standard input is empty
array(4) { [0]=> string(6) "Это" [1]=> string(10) "самая" [2]=> string(12) "лучшая" [3]=> string(12) "строка" }
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!