3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array('pietje', 'jantje', 'jasmijntje'); echo implode(",",$array).PHP_EOL; echo implode($array,',');
Output for 8.4.1 - 8.4.13
pietje,jantje,jasmijntje Fatal error: Uncaught TypeError: implode(): Argument #1 ($separator) must be of type string, array given in /in/7klUr:4 Stack trace: #0 /in/7klUr(4): implode(Array, ',') #1 {main} thrown in /in/7klUr on line 4
Process exited with code 255.
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.33, 8.2.0 - 8.2.29, 8.3.0 - 8.3.26
pietje,jantje,jasmijntje Fatal error: Uncaught TypeError: implode(): Argument #2 ($array) must be of type ?array, string given in /in/7klUr:4 Stack trace: #0 /in/7klUr(4): implode(Array, ',') #1 {main} thrown in /in/7klUr on line 4
Process exited with code 255.
Output for 7.4.0 - 7.4.25, 7.4.27 - 7.4.33
pietje,jantje,jasmijntje Deprecated: implode(): Passing glue string after array is deprecated. Swap the parameters in /in/7klUr on line 4 pietje,jantje,jasmijntje
Output for 7.1.25 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.26
pietje,jantje,jasmijntje pietje,jantje,jasmijntje

preferences:
157.81 ms | 410 KiB | 5 Q