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; var_dump($y); $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/vjn6f
function name:  (null)
number of ops:  41
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
    8    15        INIT_FCALL                                               'var_dump'
         16        SEND_VAR                                                 !1
         17        DO_ICALL                                                 
   10    18        INIT_FCALL                                               'serialize'
         19        SEND_VAR                                                 !0
         20        DO_ICALL                                         $17     
         21        ASSIGN                                                   !2, $17
   11    22        INIT_FCALL                                               'serialize'
         23        SEND_VAR                                                 !1
         24        DO_ICALL                                         $19     
         25        ASSIGN                                                   !3, $19
   13    26        INIT_FCALL                                               'unserialize'
         27        SEND_VAR                                                 !2
         28        DO_ICALL                                         $21     
         29        ASSIGN                                                   !0, $21
   14    30        INIT_FCALL                                               'unserialize'
         31        SEND_VAR                                                 !3
         32        DO_ICALL                                         $23     
         33        ASSIGN                                                   !1, $23
   16    34        FETCH_OBJ_W                                      $25     !0, 'foo'
         35        ASSIGN_OBJ                                               $25, 'bar'
         36        OP_DATA                                                  5
   17    37        INIT_FCALL                                               'var_dump'
         38        SEND_VAR                                                 !1
         39        DO_ICALL                                                 
         40      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.78 ms | 1396 KiB | 19 Q