3v4l.org

run code in 300+ PHP versions simultaneously
<?php class c { function __wakeup() { //$this->prop = 'I am awake'; } } $a = []; $a[] = new c; $a[0]->prop = 'asleep'; $a[1] =& $a[1]->prop; var_dump(unserialize(serialize($a)));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sRfqe
function name:  (null)
number of ops:  23
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   ASSIGN                                                   !0, <array>
   10     1        NEW                                              $3      'c'
          2        DO_FCALL                                      0          
          3        ASSIGN_DIM                                               !0
          4        OP_DATA                                                  $3
   11     5        FETCH_DIM_W                                      $5      !0, 0
          6        ASSIGN_OBJ                                               $5, 'prop'
          7        OP_DATA                                                  'asleep'
   12     8        FETCH_DIM_W                                      $8      !0, 1
          9        FETCH_OBJ_W                                      $9      $8, 'prop'
         10        MAKE_REF                                         $10     $9
         11        FETCH_DIM_W                                      $7      !0, 1
         12        ASSIGN_REF                                               $7, $10
   14    13        INIT_FCALL                                               'var_dump'
         14        INIT_FCALL                                               'unserialize'
         15        INIT_FCALL                                               'serialize'
         16        SEND_VAR                                                 !0
         17        DO_ICALL                                         $12     
         18        SEND_VAR                                                 $12
         19        DO_ICALL                                         $13     
         20        SEND_VAR                                                 $13
         21        DO_ICALL                                                 
         22      > RETURN                                                   1

Class c:
Function __wakeup:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sRfqe
function name:  __wakeup
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E > > RETURN                                                   null

End of function __wakeup

End of class c.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.96 ms | 1395 KiB | 19 Q