3v4l.org

run code in 300+ PHP versions simultaneously
<?php $obj = new stdClass(); $obj->{123} = "foo"; $obj->{'456'} = "bar"; $arr = (array)$obj; foreach ($arr as $k => $v) { var_dump($arr[$k]); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 10, Position 2 = 17
Branch analysis from position: 10
2 jumps found. (Code = 78) Position 1 = 11, Position 2 = 17
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
filename:       /in/fGY9u
function name:  (null)
number of ops:  19
compiled vars:  !0 = $obj, !1 = $arr, !2 = $v, !3 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $4      'stdClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $4
    4     3        ASSIGN_OBJ                                               !0, '123'
          4        OP_DATA                                                  'foo'
    5     5        ASSIGN_OBJ                                               !0, '456'
          6        OP_DATA                                                  'bar'
    7     7        CAST                                          7  ~9      !0
          8        ASSIGN                                                   !1, ~9
    9     9      > FE_RESET_R                                       $11     !1, ->17
         10    > > FE_FETCH_R                                       ~12     $11, !2, ->17
         11    >   ASSIGN                                                   !3, ~12
   10    12        INIT_FCALL                                               'var_dump'
         13        FETCH_DIM_R                                      ~14     !1, !3
         14        SEND_VAL                                                 ~14
         15        DO_ICALL                                                 
    9    16      > JMP                                                      ->10
         17    >   FE_FREE                                                  $11
   11    18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.12 ms | 1395 KiB | 15 Q