热搜:NVER node 开发 php

php对象取值的事

2024-07-21 16:45:01
php对象取值的事

var_dump($aaa);   输出如下:

object(stdClass)#2 (1) {
  ["return"]=>
  object(stdClass)#3 (3) {
    ["errorCode"]=>
    int(0)
    ["errorMessage"]=>
    string(0) ""
    ["onlineUserCount"]=>
    int(6139)
  }
}


如何获取 6139 这个数值呢?


回复讨论(解决方案)

echo $aaa->return->onlineUserCount;