scalar . PHP_EOL; foreach ($obj_w_scalar as $key => $val) print "'$key' <--> '$val'" . PHP_EOL; $obj = new StdClass(); $obj->foo = 'bar';