- property_exists: documentation ( source)
- print_r: documentation ( source)
<?php
$obj = (object)array('123' => '456');
$obj->a = 1;
print_r($obj);
echo $obj->{'123'},"\n";
echo $obj->{123},"\n";
echo property_exists(get_class($obj), '123')? 'true':'false';
echo property_exists(get_class($obj), 'a')? 'true':'false';