3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "Hello; how are you;Hey, I am fine"; $new = preg_split("/;\b/", $string, -1, PREG_SPLIT_OFFSET_CAPTURE); var_export($new);

preferences:
16.34 ms | 405 KiB | 5 Q