3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = new stdClass(); $a->foo = new stdClass(); $a->foo->bar = new stdClass(); $a->foo->ber = 'BEER'; $a->faa = 'AAAA'; $a->fee = 'EEEE'; var_dump($a); $toarray = (array)$a; var_dump($toarray);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hU5Sr
function name:  (null)
number of ops:  28
compiled vars:  !0 = $a, !1 = $toarray
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $2      'stdClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
    3     3        NEW                                              $6      'stdClass'
          4        DO_FCALL                                      0          
          5        ASSIGN_OBJ                                               !0, 'foo'
          6        OP_DATA                                                  $6
    4     7        NEW                                              $10     'stdClass'
          8        DO_FCALL                                      0          
          9        FETCH_OBJ_W                                      $8      !0, 'foo'
         10        ASSIGN_OBJ                                               $8, 'bar'
         11        OP_DATA                                                  $10
    5    12        FETCH_OBJ_W                                      $12     !0, 'foo'
         13        ASSIGN_OBJ                                               $12, 'ber'
         14        OP_DATA                                                  'BEER'
    6    15        ASSIGN_OBJ                                               !0, 'faa'
         16        OP_DATA                                                  'AAAA'
    7    17        ASSIGN_OBJ                                               !0, 'fee'
         18        OP_DATA                                                  'EEEE'
    9    19        INIT_FCALL                                               'var_dump'
         20        SEND_VAR                                                 !0
         21        DO_ICALL                                                 
   10    22        CAST                                          7  ~17     !0
         23        ASSIGN                                                   !1, ~17
   11    24        INIT_FCALL                                               'var_dump'
         25        SEND_VAR                                                 !1
         26        DO_ICALL                                                 
         27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.57 ms | 1395 KiB | 15 Q