3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = 'foo'; $b = & $a; function evilExtractor(array $data) { foreach ($data as $key => & $value) { is_string($value) && $value .= ' - modified'; } } evilExtractor(get_defined_vars()); var_dump(get_defined_vars());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gkX0F
function name:  (null)
number of ops:  13
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'foo'
    4     1        ASSIGN_REF                                               !1, !0
   13     2        INIT_FCALL                                               'evilextractor'
          3        INIT_FCALL                                               'get_defined_vars'
          4        DO_ICALL                                         $4      
          5        SEND_VAR                                                 $4
          6        DO_FCALL                                      0          
   15     7        INIT_FCALL                                               'var_dump'
          8        INIT_FCALL                                               'get_defined_vars'
          9        DO_ICALL                                         $6      
         10        SEND_VAR                                                 $6
         11        DO_ICALL                                                 
         12      > RETURN                                                   1

Function evilextractor:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 125) Position 1 = 2, Position 2 = 9
Branch analysis from position: 2
2 jumps found. (Code = 126) Position 1 = 3, Position 2 = 9
Branch analysis from position: 3
2 jumps found. (Code = 46) Position 1 = 6, Position 2 = 8
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 8
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
filename:       /in/gkX0F
function name:  evilExtractor
number of ops:  11
compiled vars:  !0 = $data, !1 = $value, !2 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    8     1      > FE_RESET_RW                                      $3      !0, ->9
          2    > > FE_FETCH_RW                                      ~4      $3, !1, ->9
          3    >   ASSIGN                                                   !2, ~4
    9     4        TYPE_CHECK                                   64  ~6      !1
          5      > JMPZ_EX                                          ~6      ~6, ->8
          6    >   ASSIGN_OP                                     8  ~7      !1, '+-+modified'
          7        BOOL                                             ~6      ~7
    8     8    > > JMP                                                      ->2
          9    >   FE_FREE                                                  $3
   11    10      > RETURN                                                   null

End of function evilextractor

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.3 ms | 1390 KiB | 18 Q