3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $obj = new StdClass(); $obj->a = 'aaa'; $obj->b = 'bbb'; var_dump(implode('","',(array)$obj)); $ar = ['x','y', 'w'=>'z']; var_dump(json_encode($ar));
based on NQvjR
Output for 5.6.0 - 5.6.38, hhvm-3.15.4 - 3.22.0, 7.0.0 - 7.2.11
string(9) "aaa","bbb" string(25) "{"0":"x","1":"y","w":"z"}"