3v4l.org

run code in 300+ PHP versions simultaneously
<?php $i = new stdClass(); $i->{1234} = "test"; $i = (array) $i; $i = array('1234' => 'test'); 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 = 12, Position 2 = 21
Branch analysis from position: 12
2 jumps found. (Code = 78) Position 1 = 13, Position 2 = 21
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
filename:       /in/qnvdW
function name:  (null)
number of ops:  23
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        ASSIGN                                                   !0, <array>
    6     8        INIT_FCALL                                               'var_dump'
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                                 
    8    11      > FE_RESET_R                                       $11     !0, ->21
         12    > > FE_FETCH_R                                       ~12     $11, !1, ->21
         13    >   ASSIGN                                                   !2, ~12
    9    14        INIT_FCALL                                               'var_dump'
         15        SEND_VAR                                                 !2
         16        SEND_VAR                                                 !1
         17        FETCH_DIM_R                                      ~14     !0, !2
         18        SEND_VAL                                                 ~14
         19        DO_ICALL                                                 
    8    20      > JMP                                                      ->12
         21    >   FE_FREE                                                  $11
   10    22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.81 ms | 1395 KiB | 15 Q