3v4l.org

run code in 300+ 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:
43.81 ms | 1990 KiB | 5 Q