3v4l.org

run code in 300+ PHP versions simultaneously
<?php class obj { private $data; public function __construct() { $this->data = "My private data"; } public function getData() { return $this->data; } } $obj = new obj; $ser = serialize($obj); var_dump($ser); $newobj = unserialize($ser); var_dump($newobj->getData()); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fIHSu
function name:  (null)
number of ops:  20
compiled vars:  !0 = $obj, !1 = $ser, !2 = $newobj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   NEW                                              $3      'obj'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $3
   15     3        INIT_FCALL                                               'serialize'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $6      
          6        ASSIGN                                                   !1, $6
   17     7        INIT_FCALL                                               'var_dump'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                                 
   19    10        INIT_FCALL                                               'unserialize'
         11        SEND_VAR                                                 !1
         12        DO_ICALL                                         $9      
         13        ASSIGN                                                   !2, $9
   21    14        INIT_FCALL                                               'var_dump'
         15        INIT_METHOD_CALL                                         !2, 'getData'
         16        DO_FCALL                                      0  $11     
         17        SEND_VAR                                                 $11
         18        DO_ICALL                                                 
   23    19      > RETURN                                                   1

Class obj:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fIHSu
function name:  __construct
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   ASSIGN_OBJ                                               'data'
          1        OP_DATA                                                  'My+private+data'
    7     2      > RETURN                                                   null

End of function __construct

Function getdata:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fIHSu
function name:  getData
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   FETCH_OBJ_R                                      ~0      'data'
          1      > RETURN                                                   ~0
   11     2*     > RETURN                                                   null

End of function getdata

End of class obj.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.94 ms | 1396 KiB | 19 Q