3v4l.org

run code in 300+ PHP versions simultaneously
<?php $object = new stdClass(); $object->foo = 'abc'; $object->bar = 'def'; $list = $object; foreach( $list as $key => $value ) { if ( is_object( $value ) ) { $list[ $key ] = $value->$field; } else { $list[ $key ] = $value[ $field ]; } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 9, Position 2 = 21
Branch analysis from position: 9
2 jumps found. (Code = 78) Position 1 = 10, Position 2 = 21
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 17
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
filename:       /in/lC3qS
function name:  (null)
number of ops:  23
compiled vars:  !0 = $object, !1 = $list, !2 = $value, !3 = $key, !4 = $field
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $5      'stdClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $5
    4     3        ASSIGN_OBJ                                               !0, 'foo'
          4        OP_DATA                                                  'abc'
    5     5        ASSIGN_OBJ                                               !0, 'bar'
          6        OP_DATA                                                  'def'
    7     7        ASSIGN                                                   !1, !0
    9     8      > FE_RESET_R                                       $11     !1, ->21
          9    > > FE_FETCH_R                                       ~12     $11, !2, ->21
         10    >   ASSIGN                                                   !3, ~12
   10    11        TYPE_CHECK                                  256          !2
         12      > JMPZ                                                     ~14, ->17
   11    13    >   FETCH_OBJ_R                                      ~16     !2, !4
         14        ASSIGN_DIM                                               !1, !3
         15        OP_DATA                                                  ~16
         16      > JMP                                                      ->20
   13    17    >   FETCH_DIM_R                                      ~18     !2, !4
         18        ASSIGN_DIM                                               !1, !3
         19        OP_DATA                                                  ~18
    9    20    > > JMP                                                      ->9
         21    >   FE_FREE                                                  $11
   15    22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.72 ms | 1394 KiB | 13 Q