3v4l.org

run code in 300+ PHP versions simultaneously
<?php $obj = new StdClass(); $obj->a = 'aaa'; $obj->b = 'bbb'; var_dump(implode(',"',$obj));
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: implode(): Argument #2 ($array) must be of type ?array, stdClass given in /in/NTlJC:7 Stack trace: #0 /in/NTlJC(7): implode(',"', Object(stdClass)) #1 {main} thrown in /in/NTlJC on line 7
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: implode(): Invalid arguments passed in /in/NTlJC on line 7 NULL

preferences:
219.39 ms | 403 KiB | 292 Q