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 = (string) 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/X2AHC
function name:  (null)
number of ops:  18
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        CAST                                          6  ~6      $5
          7        ASSIGN                                                   !1, ~6
   19     8        ASSIGN                                                   !0, null
   21     9        ECHO                                                     !1
   23    10        ECHO                                                     '%3Cpre%3E'
   24    11        INIT_FCALL                                               'print_r'
         12        INIT_FCALL                                               'unserialize'
         13        SEND_VAR                                                 !1
         14        DO_ICALL                                         $9      
         15        SEND_VAR                                                 $9
         16        DO_ICALL                                                 
   26    17      > RETURN                                                   1

Class Test:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/X2AHC
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/X2AHC
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:
150.95 ms | 936 KiB | 20 Q