3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { private $one = 1; private $two = 2; private $three = 3; public function test() {} public function __sleep() { return ['one']; } } $t = new Test; $b = serialize($t); $t = null; echo $b; echo '<pre>'; print_r(unserialize($b)); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZWa8f
function name:  (null)
number of ops:  17
compiled vars:  !0 = $t, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   NEW                                              $2      'Test'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   18     3        INIT_FCALL                                               'serialize'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $5      
          6        ASSIGN                                                   !1, $5
   19     7        ASSIGN                                                   !0, null
   21     8        ECHO                                                     !1
   23     9        ECHO                                                     '%3Cpre%3E'
   24    10        INIT_FCALL                                               'print_r'
         11        INIT_FCALL                                               'unserialize'
         12        SEND_VAR                                                 !1
         13        DO_ICALL                                         $8      
         14        SEND_VAR                                                 $8
         15        DO_ICALL                                                 
   26    16      > RETURN                                                   1

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

End of function test

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

End of function __sleep

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.78 ms | 1395 KiB | 19 Q