3v4l.org

run code in 300+ PHP versions simultaneously
<?php function &g(&$v) { return $v; } function f(&$v) { $v = 5; } $foo = null; $name = 'foo'; call_user_func_array('f', array(&$$name)); var_dump($foo);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5tX18
function name:  (null)
number of ops:  12
compiled vars:  !0 = $foo, !1 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   ASSIGN                                                   !0, null
   11     1        ASSIGN                                                   !1, 'foo'
   13     2        INIT_FCALL                                               'f'
          3        FETCH_W                      local               $4      !1
          4        INIT_ARRAY                                       ~5      $4
          5        SEND_ARRAY                                               ~5
          6        CHECK_UNDEF_ARGS                                         
          7        DO_FCALL                                      0          
   14     8        INIT_FCALL                                               'var_dump'
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                                 
         11      > RETURN                                                   1

Function g:
Finding entry points
Branch analysis from position: 0
Return found
filename:       /in/5tX18
function name:  g
number of ops:  3
compiled vars:  !0 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    3     1      > RETURN_BY_REF                                            !0
    4     2*     > RETURN_BY_REF                                            null

End of function g

Function f:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5tX18
function name:  f
number of ops:  3
compiled vars:  !0 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    7     1        ASSIGN                                                   !0, 5
    8     2      > RETURN                                                   null

End of function f

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.35 ms | 1398 KiB | 16 Q