3v4l.org

run code in 300+ PHP versions simultaneously
<?php $phones = "89521632782,89521632782,89521632782,12"; $qwerty = array($phones); $qqwe1 = explode(",", $qwerty); $result = array_unique($qqwe1); print_r($qwerty); ?>
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.7
Fatal error: Uncaught TypeError: explode(): Argument #2 ($string) must be of type string, array given in /in/mZoPb:4 Stack trace: #0 /in/mZoPb(4): explode(',', Array) #1 {main} thrown in /in/mZoPb on line 4
Process exited with code 255.
Output for 5.6.0 - 5.6.40, 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33
Warning: explode() expects parameter 2 to be string, array given in /in/mZoPb on line 4 Warning: array_unique() expects parameter 1 to be array, null given in /in/mZoPb on line 5 Array ( [0] => 89521632782,89521632782,89521632782,12 )

preferences:
190.87 ms | 403 KiB | 289 Q