3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = 'Hello World'; $strArray=explode(" ", $str); $strArray=array_reverse($strArray); $str=implode($strArray, " "); echo $str;
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.30, 8.2.0 - 8.2.25, 8.3.0 - 8.3.14
Fatal error: Uncaught TypeError: implode(): Argument #2 ($array) must be of type ?array, string given in /in/ZfEqQ:5 Stack trace: #0 /in/ZfEqQ(5): implode(Array, ' ') #1 {main} thrown in /in/ZfEqQ on line 5
Process exited with code 255.
Output for 7.4.0 - 7.4.33
Deprecated: implode(): Passing glue string after array is deprecated. Swap the parameters in /in/ZfEqQ on line 5 World Hello
Output for 7.2.0 - 7.2.33, 7.3.0 - 7.3.33
World Hello

preferences:
59.3 ms | 408 KiB | 5 Q