3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.81 ms | 1399 KiB | 15 Q