3v4l.org

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

Function a:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9DdjK
function name:  a
number of ops:  6
compiled vars:  !0 = $name, !1 = $SESSION
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1        BIND_GLOBAL                                              !1, 'SESSION'
    8     2        FETCH_R                      local               ~3      !0
          3        ASSIGN_DIM                                               !1, !0
          4        OP_DATA                                                  ~3
    9     5      > RETURN                                                   null

End of function a

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.7 ms | 1397 KiB | 16 Q