3v4l.org

run code in 300+ PHP versions simultaneously
<?php // words inside string with umlaute, later add http://zahnstocher47.de instead of "zahnstocher" as the correct solution $string = "apfelsaft siebenundvierzig zahnstocher gelb ethereum österreich"; // get length of string $l = mb_strlen($string); $chars = mb_str_split($string); $f = ''; // loop through length and output each letter by itself for ($i = 0; $i <= $l; $i++){ // umlaute buggy when there is a concatenation $f .= $chars[$i] . " "; } var_dump($f);

preferences:
20.43 ms | 529 KiB | 14 Q