Why the refcount is 2 not 1?

后端 未结 5 1475
心在旅途
心在旅途 2021-01-02 10:44
  $var = 1;
  debug_zval_dump($var);

Output:

long(1) refcount(2)


  $var = 1;
  $var_dup = &$var;
  debug_zval_dump($var);exit         


        
5条回答
  •  自闭症患者
    2021-01-02 11:19

    I think the documentation for this method explains this under the section "Beware the Ref Count":

    debug_zval_dump

提交回复
热议问题