3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = ':foo!bar@cookie.net strawberry cheesecake :hello world: this is a message!'; $result = preg_split('/[^:]*:[^:]*\K /', $string, 2); array_unshift($result, ...explode(' ', array_shift($result))); var_export($result);

preferences:
24.02 ms | 408 KiB | 5 Q