3v4l.org

run code in 300+ PHP versions simultaneously
<?php $b = 1; a($b); function a($a){ debug_zval_dump($a);//refcount=4 why not 3?? xdebug_debug_zval('a');//refcount=3 why not 2?? }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JeGJ0
function name:  (null)
number of ops:  5
compiled vars:  !0 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 1
    3     1        INIT_FCALL_BY_NAME                                       'a'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
    6     4      > RETURN                                                   1

Function a:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JeGJ0
function name:  a
number of ops:  5
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    5     1        INIT_FCALL                                               'debug_zval_dump'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
    6     4      > RETURN                                                   null

End of function a

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.35 ms | 1394 KiB | 15 Q