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.
PHP中有这个stdClass的东西:
<?php $fakeobj->hi = "o"; echo $fakeobj->hi;
看?这是php4吗?
StdClass 存在于 php 4 和 5 中。它也不一定 - 它只是一个没有方法的基本类实现 - 一个值对象。当某些函数需要生成一个没有显式用户定义类的对象时,json_decode或者在没有显式映射类时由 SOAP 请求返回的值对象时,它们会使用它。当然,用户/开发人员也可以使用它。
json_decode