So, firstly, although the print_r()conclusion is drawn that the property is literally an integer 0, this is not so. If instead you name var_dump()the object, you will see that it actually looks like this:
php > var_dump($myobject);
object(stdClass)#2 (1) {
["0"]=>
string(4) "testData"
}
, 0, PHP $myobject->0? () :
php > echo $myobject->{0};
test
php > echo $myobject->{'0'};
test
php >
, .