3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.34 ms | 999 KiB | 14 Q