3v4l.org

run code in 300+ PHP versions simultaneously
<?php /*** сложный объект ***/ $obj = new stdClass; $obj->foo = new stdClass; $obj->foo->baz = 'baz'; $obj->bar = 'bar'; /*** преобразование объекта в массив ***/ $array = (array) $obj; /*** просмотр результата ***/ print_r( $array );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fJt06
function name:  (null)
number of ops:  18
compiled vars:  !0 = $obj, !1 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $2      'stdClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
    4     3        NEW                                              $6      'stdClass'
          4        DO_FCALL                                      0          
          5        ASSIGN_OBJ                                               !0, 'foo'
          6        OP_DATA                                                  $6
    5     7        FETCH_OBJ_W                                      $8      !0, 'foo'
          8        ASSIGN_OBJ                                               $8, 'baz'
          9        OP_DATA                                                  'baz'
    6    10        ASSIGN_OBJ                                               !0, 'bar'
         11        OP_DATA                                                  'bar'
    9    12        CAST                                          7  ~11     !0
         13        ASSIGN                                                   !1, ~11
   12    14        INIT_FCALL                                               'print_r'
         15        SEND_VAR                                                 !1
         16        DO_ICALL                                                 
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.17 ms | 1394 KiB | 15 Q