w对象 数组 分别对内存的 消耗

CI result()

This method returns the query result as an array of objects, or an empty array on failure. 

http://stackoverflow.com/questions/9474446/get-first-element-in-php-stdobject

 

<?php
$obj = new StdClass;
for ($w = 0; $w < 4; $w++) {
    $obj->$w = $w;

}
$obj->www = 123;

echo $obj->www;

echo $obj->{0};
var_dump($obj);
//var_dump($obj->'0');

$obj->0;

$obj->'0';

$obj->"0";

$obj->{0};

Parse error: syntax error, unexpected T_LNUMBER, expecting T_STRING or T_VARIABLE or '{' or '$'

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-06-04
  • 2021-11-25
  • 2021-05-31
  • 2021-12-27
  • 2021-04-30
猜你喜欢
  • 2022-12-23
  • 2021-08-26
  • 2022-12-23
  • 2022-12-23
  • 2021-07-28
  • 2021-10-09
相关资源
相似解决方案