Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个带有“。”键的对象。他们里面的性格..
如何仅使用 $var->site.title 正确访问它们
有没有办法做到这一点,坚持对象方法?
使用变量变量语法:
$obj->{"site.title"}