$fruits = explode(',', 'apple,banana,orange');
print_r($fruits);

/* 출력:
Array
(
    [0] => apple
    [1] => banana
    [2] => orange
)
*/
explode(string $delimiter, string $string, int $limit = PHP_INT_MAX): array
$sentence = '반갑습니다. 환영합니다!';
$words_array = explode('', $sentence);

var_dump($words_array); // bool(false)
$sentence = ',반갑습니다. 환영합니다!';
$words_array = explode(',', $sentence);

var_dump($words_array);
// array(2) { [0]=> string(0) "" [1]=> string(33) "반갑습니다. 환영합니다!" }
$sentence = '반갑습니다. 환영합니다!,';
$words_array = explode(',', $sentence);

var_dump($words_array);
// array(2) { [0]=> string(33) "반갑습니다. 환영합니다!" [1]=> string(0) "" }
$sentence = ',반갑습니다. 환영합니다!,';
$words_array = explode(',', $sentence);

var_dump($words_array);
// array(3) { [0]=> string(0) "" [1]=> string(33) "반갑습니다. 환영합니다!" [2]=> string(0) "" }
$sentence = '반';
$words_array = explode('반', $sentence);

var_dump($words_array);
// array(2) { [0]=> string(0) "" [1]=> string(0) "" }
$input_string = 'apple|banana|orange';
$delimiter = '|';
$fruits_array = explode($delimiter, $input_string);

print_r($fruits_array);

/* 출력:
Array
(
    [0] => apple
    [1] => banana
    [2] => orange
)
*/
$url = 'https://www.example.com/products?category=electronics&page=1';
$parts = explode('?', $url);

$path = $parts[0];
$query_string = $parts[1];

echo "Path: $path"; // 출력: 'Path: https://www.example.com/products'
echo "Query String: $query_string"; // 출력: 'Query String: category=electronics&page=1'
$time = '02:30:45';
$timeParts = explode(':', $time);
$hours = $timeParts[0];
echo "Hours: $hours"; // 출력: 'Hours: 02'