3v4l.org

run code in 500+ PHP versions simultaneously
<?php $words = ["hi", "my", "name", "is", "john doe"]; $words = explode(' ', implode(' ', $words)); var_dump($words);
Output for 7.4.0 - 7.4.33, 8.0.1 - 8.0.30, 8.1.0 - 8.1.34, 8.2.0 - 8.2.31, 8.3.0 - 8.3.31, 8.4.1 - 8.4.22, 8.5.0 - 8.5.7
array(6) { [0]=> string(2) "hi" [1]=> string(2) "my" [2]=> string(4) "name" [3]=> string(2) "is" [4]=> string(4) "john" [5]=> string(3) "doe" }

preferences:
93.15 ms | 1296 KiB | 4 Q