I found this piece of code in the Phoronix Test Suite:
$os_packages_to_install = explode(' ', implode(' ', $os_packages_to_install));
I’ve seen it before and I don’t see it’s point. What does it do?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It will return an array but the difference with
$os_packages_to_installis that if a value of$os_packages_to_installcontains a space, it will also be splitted.so:
implode gives:
explode again will give: