3v4l.org

run code in 300+ PHP versions simultaneously
<?php class T implements Serializable { protected $_data = array('a' => 1, 'b' => 2, 'c' => 3, 'd' => array( 'x', 'y', 'z', )); public function serialize() { $vars = get_object_vars($this); var_dump($vars); $vars['_data']['d'] = serialize($vars['_data']['d']); var_dump($vars); return serialize($_data); } public function unserialize($vars) {} } $t = new T; var_dump(serialize($t));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kPQ6n
function name:  (null)
number of ops:  11
compiled vars:  !0 = $t
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CLASS                                            't'
   22     1        NEW                                              $1      'T'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   23     4        INIT_FCALL                                               'var_dump'
          5        INIT_FCALL                                               'serialize'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $4      
          8        SEND_VAR                                                 $4
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

Class T:
Function serialize:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kPQ6n
function name:  serialize
number of ops:  24
compiled vars:  !0 = $vars, !1 = $_data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   INIT_FCALL                                               'get_object_vars'
          1        FETCH_THIS                                       ~2      
          2        SEND_VAL                                                 ~2
          3        DO_ICALL                                         $3      
          4        ASSIGN                                                   !0, $3
   12     5        INIT_FCALL                                               'var_dump'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                                 
   13     8        INIT_FCALL                                               'serialize'
          9        FETCH_DIM_R                                      ~8      !0, '_data'
         10        FETCH_DIM_R                                      ~9      ~8, 'd'
         11        SEND_VAL                                                 ~9
         12        DO_ICALL                                         $10     
         13        FETCH_DIM_W                                      $6      !0, '_data'
         14        ASSIGN_DIM                                               $6, 'd'
         15        OP_DATA                                                  $10
   14    16        INIT_FCALL                                               'var_dump'
         17        SEND_VAR                                                 !0
         18        DO_ICALL                                                 
   15    19        INIT_FCALL                                               'serialize'
         20        SEND_VAR                                                 !1
         21        DO_ICALL                                         $12     
         22      > RETURN                                                   $12
   16    23*     > RETURN                                                   null

End of function serialize

Function unserialize:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kPQ6n
function name:  unserialize
number of ops:  2
compiled vars:  !0 = $vars
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   RECV                                             !0      
   19     1      > RETURN                                                   null

End of function unserialize

End of class T.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.61 ms | 1392 KiB | 19 Q