What are the differences between implode and explode functions in PHP in terms of return values?

The implode function in PHP takes an array as input and concatenates its elements into a string, which is then returned. On the other hand, the explode function in PHP takes a delimiter and a string as input and splits the string into an array based on the delimiter, which is then returned. Therefore, the main difference in terms of return values is that implode returns a string, while explode returns an array.

// Using implode function
$array = array('Hello', 'World', '!');
$string = implode(' ', $array);
echo $string; // Output: Hello World !

// Using explode function
$string = 'Hello,World,!';
$array = explode(',', $string);
print_r($array); // Output: Array ( [0] => Hello [1] => World [2] => ! )