3v4l.org

run code in 300+ PHP versions simultaneously
<?php $picture = new StdClass(); $picture->test = 'bar'; $foo = array('picture' => $picture); $bar = clone $foo['picture']; var_dump($bar);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BkbMu
function name:  (null)
number of ops:  14
compiled vars:  !0 = $picture, !1 = $foo, !2 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $3      'StdClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $3
    4     3        ASSIGN_OBJ                                               !0, 'test'
          4        OP_DATA                                                  'bar'
    6     5        INIT_ARRAY                                       ~7      !0, 'picture'
          6        ASSIGN                                                   !1, ~7
    8     7        FETCH_DIM_R                                      ~9      !1, 'picture'
          8        CLONE                                            ~10     ~9
          9        ASSIGN                                                   !2, ~10
   10    10        INIT_FCALL                                               'var_dump'
         11        SEND_VAR                                                 !2
         12        DO_ICALL                                                 
         13      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.31 ms | 1394 KiB | 15 Q