3v4l.org

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

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

End of function g

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
223.72 ms | 1397 KiB | 16 Q