3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.3 ms | 1400 KiB | 19 Q