- var_dump: documentation ( source)
<?php
$test = array(
new stdClass,
"hello",
3,
array("baz", "bay"),
"world"
);
foreach ($test as $case) {
try {
$value = (string) $case;
print $value;
} catch (Exception $e) {
print "<pre>";
var_dump($e);
}
}