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); $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/rvfOP
function name:  (null)
number of ops:  44
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
   23    22        INIT_FCALL                                               'unserialize'
         23        SEND_VAR                                                 !2
         24        DO_ICALL                                         $16     
         25        ASSIGN                                                   !3, $16
   25    26        INIT_FCALL                                               'var_dump'
         27        FETCH_DIM_R                                      ~18     !3, 'common'
         28        SEND_VAL                                                 ~18
         29        DO_ICALL                                                 
   26    30        INIT_FCALL                                               'var_dump'
         31        FETCH_DIM_R                                      ~20     !3, 'a1'
         32        FETCH_DIM_R                                      ~21     ~20, 'common'
         33        SEND_VAL                                                 ~21
         34        DO_ICALL                                                 
   27    35        INIT_FCALL                                               'var_dump'
         36        FETCH_DIM_R                                      ~23     !3, 'a2'
         37        FETCH_DIM_R                                      ~24     ~23, 'common'
         38        SEND_VAL                                                 ~24
         39        DO_ICALL                                                 
   29    40        INIT_FCALL                                               'var_dump'
         41        SEND_VAR                                                 !2
         42        DO_ICALL                                                 
         43      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.18 ms | 1400 KiB | 19 Q