3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = 'foo'; $b = & $a; function evilExtractor(array $data) { foreach ($data as $key => & $value) { if (is_string($value)) { $value .= ' - modified'; } } } evilExtractor(get_defined_vars()); var_dump($a, $b);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lihLc
function name:  (null)
number of ops:  12
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
   15     2        INIT_FCALL                                               'evilextractor'
          3        INIT_FCALL                                               'get_defined_vars'
          4        DO_ICALL                                         $4      
          5        SEND_VAR                                                 $4
          6        DO_FCALL                                      0          
   17     7        INIT_FCALL                                               'var_dump'
          8        SEND_VAR                                                 !0
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                                 
         11      > RETURN                                                   1

Function evilextractor:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 125) Position 1 = 2, Position 2 = 8
Branch analysis from position: 2
2 jumps found. (Code = 126) Position 1 = 3, Position 2 = 8
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 7
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 7
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
filename:       /in/lihLc
function name:  evilExtractor
number of ops:  10
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, ->8
          2    > > FE_FETCH_RW                                      ~4      $3, !1, ->8
          3    >   ASSIGN                                                   !2, ~4
    9     4        TYPE_CHECK                                   64          !1
          5      > JMPZ                                                     ~6, ->7
   10     6    >   ASSIGN_OP                                     8          !1, '+-+modified'
    8     7    > > JMP                                                      ->2
          8    >   FE_FREE                                                  $3
   13     9      > RETURN                                                   null

End of function evilextractor

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.44 ms | 1399 KiB | 18 Q