3v4l.org

run code in 300+ PHP versions simultaneously
<?php $aa = 'str2'; function doom(){ $a = 'str'; $b = 2; return print_r(get_defined_vars(),true); } echo doom(); echo get_defined_vars();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aNbtX
function name:  (null)
number of ops:  8
compiled vars:  !0 = $aa
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'str2'
    8     1        INIT_FCALL                                               'doom'
          2        DO_FCALL                                      0  $2      
          3        ECHO                                                     $2
    9     4        INIT_FCALL                                               'get_defined_vars'
          5        DO_ICALL                                         $3      
          6        ECHO                                                     $3
          7      > RETURN                                                   1

Function doom:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aNbtX
function name:  doom
number of ops:  10
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, 'str'
    5     1        ASSIGN                                                   !1, 2
    6     2        INIT_FCALL                                               'print_r'
          3        INIT_FCALL                                               'get_defined_vars'
          4        DO_ICALL                                         $4      
          5        SEND_VAR                                                 $4
          6        SEND_VAL                                                 <true>
          7        DO_ICALL                                         $5      
          8      > RETURN                                                   $5
    7     9*     > RETURN                                                   null

End of function doom

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.18 ms | 1397 KiB | 18 Q