3v4l.org

run code in 300+ PHP versions simultaneously
<?php $user = new stdClass(); $user->id = 1; $user->name = 'John Doe'; class Herman { private $milk; public function setMilk($flag) { $this->milk = $flag; } } $hermit = new Herman(); $hermit->setMilk(true); $user->hermit = $hermit; $foobar = array('foo' => 'bar', 'user' => $user); $serialized = serialize($foobar); echo "Serialized: ${serialized}"; var_dump(unserialize($serialized));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IrSkI
function name:  (null)
number of ops:  32
compiled vars:  !0 = $user, !1 = $hermit, !2 = $foobar, !3 = $serialized
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $4      'stdClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $4
    3     3        ASSIGN_OBJ                                               !0, 'id'
          4        OP_DATA                                                  1
    4     5        ASSIGN_OBJ                                               !0, 'name'
          6        OP_DATA                                                  'John+Doe'
   16     7        NEW                                              $9      'Herman'
          8        DO_FCALL                                      0          
          9        ASSIGN                                                   !1, $9
   17    10        INIT_METHOD_CALL                                         !1, 'setMilk'
         11        SEND_VAL_EX                                              <true>
         12        DO_FCALL                                      0          
   19    13        ASSIGN_OBJ                                               !0, 'hermit'
         14        OP_DATA                                                  !1
   21    15        INIT_ARRAY                                       ~14     'bar', 'foo'
         16        ADD_ARRAY_ELEMENT                                ~14     !0, 'user'
         17        ASSIGN                                                   !2, ~14
   22    18        INIT_FCALL                                               'serialize'
         19        SEND_VAR                                                 !2
         20        DO_ICALL                                         $16     
         21        ASSIGN                                                   !3, $16
   24    22        NOP                                                      
         23        FAST_CONCAT                                      ~18     'Serialized%3A+', !3
         24        ECHO                                                     ~18
   26    25        INIT_FCALL                                               'var_dump'
         26        INIT_FCALL                                               'unserialize'
         27        SEND_VAR                                                 !3
         28        DO_ICALL                                         $19     
         29        SEND_VAR                                                 $19
         30        DO_ICALL                                                 
         31      > RETURN                                                   1

Class Herman:
Function setmilk:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IrSkI
function name:  setMilk
number of ops:  4
compiled vars:  !0 = $flag
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
   12     1        ASSIGN_OBJ                                               'milk'
          2        OP_DATA                                                  !0
   13     3      > RETURN                                                   null

End of function setmilk

End of class Herman.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.14 ms | 1396 KiB | 19 Q