3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Record implements Serializable { public $data = array(); public function __construct() { $object = new StdClass(); $object->property = 'whoa'; $this->data = array( 'array' => array(1,2,3,5), 'object' => $object, 'serializedArray' => serialize(array(1,2,3,5)), 'serializedObject' => serialize($object), 'string' => '12345', 'integer' => 123455 ); } public function serialize() { return serialize($this->data); } public function unserialize($serialized) { } } $object = new Record(); var_dump(serialize($object));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/djjCP
function name:  (null)
number of ops:  11
compiled vars:  !0 = $object
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CLASS                                            'record'
   33     1        NEW                                              $1      'Record'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   35     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 Record:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/djjCP
function name:  __construct
number of ops:  20
compiled vars:  !0 = $object
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   NEW                                              $1      'StdClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   10     3        ASSIGN_OBJ                                               !0, 'property'
          4        OP_DATA                                                  'whoa'
   13     5        INIT_ARRAY                                       ~6      <array>, 'array'
   14     6        ADD_ARRAY_ELEMENT                                ~6      !0, 'object'
   15     7        INIT_FCALL                                               'serialize'
          8        SEND_VAL                                                 <array>
          9        DO_ICALL                                         $7      
         10        ADD_ARRAY_ELEMENT                                ~6      $7, 'serializedArray'
   16    11        INIT_FCALL                                               'serialize'
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                         $8      
         14        ADD_ARRAY_ELEMENT                                ~6      $8, 'serializedObject'
   17    15        ADD_ARRAY_ELEMENT                                ~6      '12345', 'string'
   18    16        ADD_ARRAY_ELEMENT                                ~6      123455, 'integer'
   12    17        ASSIGN_OBJ                                               'data'
   18    18        OP_DATA                                                  ~6
   20    19      > RETURN                                                   null

End of function __construct

Function serialize:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/djjCP
function name:  serialize
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   INIT_FCALL                                               'serialize'
          1        FETCH_OBJ_R                                      ~0      'data'
          2        SEND_VAL                                                 ~0
          3        DO_ICALL                                         $1      
          4      > RETURN                                                   $1
   25     5*     > 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/djjCP
function name:  unserialize
number of ops:  2
compiled vars:  !0 = $serialized
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   27     0  E >   RECV                                             !0      
   30     1      > RETURN                                                   null

End of function unserialize

End of class Record.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.57 ms | 1400 KiB | 17 Q