草庐IT

php - 如何访问php花括号对象属性

这个问题在这里已经有了答案:8年前关闭。PossibleDuplicate:Howtoaccessobjectpropertieswithnameslikeintegers?print_r($myObj)给出以下结果:stdClassObject([4021450]=>stdClassObject([property1]=>ooo[property2]=>xxx)[3971601]=>stdClassObject([property1]=>123[property2]=>356))如何使用带变量的花括号语法访问sub-object?我试过:$myObj->'3971601';//Par