3v4l.org

run code in 300+ PHP versions simultaneously
<?php $test = new stdClass(); $array = array('test'=>'test_prop'); foreach ($array as $name => $prop){ $test->$array[$name] = 'SET!'; } print_r($test);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 11
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 11
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
filename:       /in/LIHLR
function name:  (null)
number of ops:  16
compiled vars:  !0 = $test, !1 = $array, !2 = $prop, !3 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $4      'stdClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $4
    3     3        ASSIGN                                                   !1, <array>
    4     4      > FE_RESET_R                                       $8      !1, ->11
          5    > > FE_FETCH_R                                       ~9      $8, !2, ->11
          6    >   ASSIGN                                                   !3, ~9
    5     7        FETCH_OBJ_W                                      $11     !0, !1
          8        ASSIGN_DIM                                               $11, !3
          9        OP_DATA                                                  'SET%21'
    4    10      > JMP                                                      ->5
         11    >   FE_FREE                                                  $8
    7    12        INIT_FCALL                                               'print_r'
         13        SEND_VAR                                                 !0
         14        DO_ICALL                                                 
         15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.49 ms | 1386 KiB | 15 Q