3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = 'foo.bar,baz?bak!qux'; $arr = preg_split('/[.,?!]/', $text, -1, PREG_SPLIT_NO_EMPTY); print_r($arr);

preferences:
43.02 ms | 402 KiB | 5 Q