码迷,mamicode.com
首页 > 数据库 > 详细

inaccessible

时间:2016-09-10 06:39:49      阅读:239      评论:0      收藏:0      [点我收藏+]

标签:

 

$w = (object)array(‘key0‘=>‘a‘,‘key1‘=>‘b‘,0,1,2,0=>‘0w‘,1=>‘1w‘,‘11‘=>‘11str‘);
var_dump($w);

 

object(stdClass)[4]
  public ‘key0‘ => string ‘a‘ (length=1)
  public ‘key1‘ => string ‘b‘ (length=1)
  public 0 => string ‘0w‘ (length=2)
  public 1 => string ‘1w‘ (length=2)
  public 2 => int 2
  public 11 => string ‘11str‘ (length=5)

 

If an object is converted to an object, it is not   modified. If a value of any other type is converted to an    object, a new instance of the stdClass   built-in class is created. If the value was NULL, the new instance will be   empty.

An array converts to an object with properties   named by keys and corresponding values, with the exception of numeric keys which    will be inaccessible unless iterated.

 

inaccessible

标签:

原文地址:http://www.cnblogs.com/yuanjiangw/p/5858551.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!