首页 > 代码库 > inaccessible
inaccessible
$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
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。