3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array(); $a['common'] = 123; $a['a1'] = array( 'common' => &$a['common'], 'elt1' => 11, 'elt2' => 12 ); $a['a2'] = array( 'common' => &$a['common'], 'elt1' => 21, 'elt2' => 22 ); $as = serialize($a); $a2 = unserialize($as); var_dump($a2['common']); var_dump($a2['a1']['common']); var_dump($a2['a2']['common']);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/c7Khc
function name:  (null)
number of ops:  38
compiled vars:  !0 = $a, !1 = $as, !2 = $a2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        ASSIGN_DIM                                               !0, 'common'
          2        OP_DATA                                                  123
    8     3        FETCH_DIM_W                                      $6      !0, 'common'
          4        INIT_ARRAY                                       ~7      $6, 'common'
    9     5        ADD_ARRAY_ELEMENT                                ~7      11, 'elt1'
   10     6        ADD_ARRAY_ELEMENT                                ~7      12, 'elt2'
    7     7        ASSIGN_DIM                                               !0, 'a1'
   10     8        OP_DATA                                                  ~7
   14     9        FETCH_DIM_W                                      $9      !0, 'common'
         10        INIT_ARRAY                                       ~10     $9, 'common'
   15    11        ADD_ARRAY_ELEMENT                                ~10     21, 'elt1'
   16    12        ADD_ARRAY_ELEMENT                                ~10     22, 'elt2'
   13    13        ASSIGN_DIM                                               !0, 'a2'
   16    14        OP_DATA                                                  ~10
   19    15        INIT_FCALL                                               'serialize'
         16        SEND_VAR                                                 !0
         17        DO_ICALL                                         $11     
         18        ASSIGN                                                   !1, $11
   21    19        INIT_FCALL                                               'unserialize'
         20        SEND_VAR                                                 !1
         21        DO_ICALL                                         $13     
         22        ASSIGN                                                   !2, $13
   23    23        INIT_FCALL                                               'var_dump'
         24        FETCH_DIM_R                                      ~15     !2, 'common'
         25        SEND_VAL                                                 ~15
         26        DO_ICALL                                                 
   24    27        INIT_FCALL                                               'var_dump'
         28        FETCH_DIM_R                                      ~17     !2, 'a1'
         29        FETCH_DIM_R                                      ~18     ~17, 'common'
         30        SEND_VAL                                                 ~18
         31        DO_ICALL                                                 
   25    32        INIT_FCALL                                               'var_dump'
         33        FETCH_DIM_R                                      ~20     !2, 'a2'
         34        FETCH_DIM_R                                      ~21     ~20, 'common'
         35        SEND_VAL                                                 ~21
         36        DO_ICALL                                                 
         37      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.71 ms | 1388 KiB | 19 Q