3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x = array('hello'); $x[] = & $x; $y = unserialize(serialize($x)); $y[0] = 'world'; $x[0] = 'world'; var_dump($x); var_dump($y);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5ukF2
function name:  (null)
number of ops:  21
compiled vars:  !0 = $x, !1 = $y
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        FETCH_DIM_W                                      $3      !0
          2        ASSIGN_REF                                               $3, !0
    6     3        INIT_FCALL                                               'unserialize'
          4        INIT_FCALL                                               'serialize'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $5      
          7        SEND_VAR                                                 $5
          8        DO_ICALL                                         $6      
          9        ASSIGN                                                   !1, $6
    8    10        ASSIGN_DIM                                               !1, 0
         11        OP_DATA                                                  'world'
    9    12        ASSIGN_DIM                                               !0, 0
         13        OP_DATA                                                  'world'
   11    14        INIT_FCALL                                               'var_dump'
         15        SEND_VAR                                                 !0
         16        DO_ICALL                                                 
   12    17        INIT_FCALL                                               'var_dump'
         18        SEND_VAR                                                 !1
         19        DO_ICALL                                                 
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.6 ms | 1399 KiB | 19 Q