What are some common functions in PHP that can be used to manipulate strings and add spaces at specific intervals?

When working with strings in PHP, you may need to manipulate them by adding spaces at specific intervals to improve readability or formatting. One common way to achieve this is by using the `str_split()` function to split the string into an array of characters, then using `implode()` to join them back together with spaces added at the desired intervals.

$string = "HelloWorld";
$interval = 5;

$characters = str_split($string, $interval);
$formattedString = implode(" ", $characters);

echo $formattedString;