Unexpected observation: var_dump() of an array is flagging referenced elements… since when?

别说谁变了你拦得住时间么 提交于 2019-11-30 13:51:19

Not sure if this answers your question, but you can use

debug_zval_dump($array);

to get the refcount:

array(4) refcount(2){ 
    [0]=> long(1) refcount(1) 
    [1]=> &long(2) refcount(2) 
    [2]=> long(3) refcount(1) 
    [3]=> &long(4) refcount(2) 
} 

Also see this Article by Derick Rethans (PHP Core Dev) about Refcounting.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!