3v4l.org

run code in 500+ PHP versions simultaneously
<?php $string = "hello world. Hello world"; $words = explode(' ', $string); $html = '<span>' . $words[0] . '</span> ' . Implode(" ", array_slice($words,1)); Echo $html;

preferences:
110.46 ms | 1983 KiB | 5 Q