首页 > 数据库技术 > 详细

inaccessible

时间:2016-09-10 06:36:41      阅读:216      评论: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
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!