3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x = new stdClass; $y = new stdClass; $y->foo = $x->foo = new stdClass; $x->foo->bar = 2; $xSer = serialize($x); $ySer = serialize($y); $x = unserialize($xSer); $y = unserialize($ySer); $x->foo->bar = 5; var_dump($y);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XEsQq
function name:  (null)
number of ops:  38
compiled vars:  !0 = $x, !1 = $y, !2 = $xSer, !3 = $ySer
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $4      'stdClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $4
    4     3        NEW                                              $7      'stdClass'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $7
    5     6        NEW                                              $12     'stdClass'
          7        DO_FCALL                                      0          
          8        ASSIGN_OBJ                                       ~11     !0, 'foo'
          9        OP_DATA                                                  $12
         10        ASSIGN_OBJ                                               !1, 'foo'
         11        OP_DATA                                                  ~11
    7    12        FETCH_OBJ_W                                      $14     !0, 'foo'
         13        ASSIGN_OBJ                                               $14, 'bar'
         14        OP_DATA                                                  2
    9    15        INIT_FCALL                                               'serialize'
         16        SEND_VAR                                                 !0
         17        DO_ICALL                                         $16     
         18        ASSIGN                                                   !2, $16
   10    19        INIT_FCALL                                               'serialize'
         20        SEND_VAR                                                 !1
         21        DO_ICALL                                         $18     
         22        ASSIGN                                                   !3, $18
   12    23        INIT_FCALL                                               'unserialize'
         24        SEND_VAR                                                 !2
         25        DO_ICALL                                         $20     
         26        ASSIGN                                                   !0, $20
   13    27        INIT_FCALL                                               'unserialize'
         28        SEND_VAR                                                 !3
         29        DO_ICALL                                         $22     
         30        ASSIGN                                                   !1, $22
   15    31        FETCH_OBJ_W                                      $24     !0, 'foo'
         32        ASSIGN_OBJ                                               $24, 'bar'
         33        OP_DATA                                                  5
   16    34        INIT_FCALL                                               'var_dump'
         35        SEND_VAR                                                 !1
         36        DO_ICALL                                                 
         37      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
299.5 ms | 1396 KiB | 20 Q