3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = 'foo'; $b = & $a; function evilExtractor(array $data) { extract($data, EXTR_REFS); $values = get_defined_vars(); foreach ($values 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/MbrjW
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
   19     2        INIT_FCALL                                               'evilextractor'
          3        INIT_FCALL                                               'get_defined_vars'
          4        DO_ICALL                                         $4      
          5        SEND_VAR                                                 $4
          6        DO_FCALL                                      0          
   21     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 = 9, Position 2 = 15
Branch analysis from position: 9
2 jumps found. (Code = 126) Position 1 = 10, Position 2 = 15
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 14
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 14
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
filename:       /in/MbrjW
function name:  evilExtractor
number of ops:  17
compiled vars:  !0 = $data, !1 = $values, !2 = $value, !3 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    8     1        INIT_FCALL                                               'extract'
          2        SEND_REF                                                 !0
          3        SEND_VAL                                                 256
          4        DO_ICALL                                                 
   10     5        INIT_FCALL                                               'get_defined_vars'
          6        DO_ICALL                                         $5      
          7        ASSIGN                                                   !1, $5
   12     8      > FE_RESET_RW                                      $7      !1, ->15
          9    > > FE_FETCH_RW                                      ~8      $7, !2, ->15
         10    >   ASSIGN                                                   !3, ~8
   13    11        TYPE_CHECK                                   64          !2
         12      > JMPZ                                                     ~10, ->14
   14    13    >   ASSIGN_OP                                     8          !2, '+-+modified'
   12    14    > > JMP                                                      ->9
         15    >   FE_FREE                                                  $7
   17    16      > RETURN                                                   null

End of function evilextractor

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.12 ms | 1399 KiB | 20 Q