3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public function serialize() { return serialize(array($this->default_namespace, $this->parameters)); } /** * Unserializes a sfNamespacedParameterHolder instance. * * @param string $serialized A serialized sfNamespacedParameterHolder instance */ public function unserialize($serialized) { $data = unserialize($serialized); $this->default_namespace = $data[0]; $this->parameters = $data[1]; } } new A(); $a = serialize(new A()); $b = unserialize($a);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pcDj4
function name:  (null)
number of ops:  14
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   NEW                                              $2      'A'
          1        DO_FCALL                                      0          
          2        FREE                                                     $2
   24     3        INIT_FCALL                                               'serialize'
          4        NEW                                              $4      'A'
          5        DO_FCALL                                      0          
          6        SEND_VAR                                                 $4
          7        DO_ICALL                                         $6      
          8        ASSIGN                                                   !0, $6
   25     9        INIT_FCALL                                               'unserialize'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                         $8      
         12        ASSIGN                                                   !1, $8
         13      > RETURN                                                   1

Class A:
Function serialize:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pcDj4
function name:  serialize
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   INIT_FCALL                                               'serialize'
          1        FETCH_OBJ_R                                      ~0      'default_namespace'
          2        INIT_ARRAY                                       ~1      ~0
          3        FETCH_OBJ_R                                      ~2      'parameters'
          4        ADD_ARRAY_ELEMENT                                ~1      ~2
          5        SEND_VAL                                                 ~1
          6        DO_ICALL                                         $3      
          7      > RETURN                                                   $3
    7     8*     > 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/pcDj4
function name:  unserialize
number of ops:  12
compiled vars:  !0 = $serialized, !1 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   RECV                                             !0      
   16     1        INIT_FCALL                                               'unserialize'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $2      
          4        ASSIGN                                                   !1, $2
   18     5        FETCH_DIM_R                                      ~5      !1, 0
          6        ASSIGN_OBJ                                               'default_namespace'
          7        OP_DATA                                                  ~5
   19     8        FETCH_DIM_R                                      ~7      !1, 1
          9        ASSIGN_OBJ                                               'parameters'
         10        OP_DATA                                                  ~7
   20    11      > RETURN                                                   null

End of function unserialize

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.11 ms | 1011 KiB | 15 Q