- property_exists: documentation ( source)
- print_r: documentation ( source)
<?php
$obj = (object)array('123a' => '456');
print_r($obj);
if (!property_exists($obj,'123a')) {
echo '123a does not exist',"\n";
}
echo !isset($obj->{'123a'})? '123a is null' : $obj->{'123a'};
echo "\n";