3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { private $a = "a"; protected $b = "b"; public $c = "c"; } class B extends A implements Serializable { public function serialize() { $that = $this; return serialize($that); } public function unserialize($serialized) { } private $a = "a"; protected $b = "b"; public $c = "c"; } var_dump(serialize(new A())); var_dump(serialize(new B()));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/t2UQ2
function name:  (null)
number of ops:  18
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   DECLARE_CLASS                                            'b', 'a'
   25     1        INIT_FCALL                                               'var_dump'
          2        INIT_FCALL                                               'serialize'
          3        NEW                                              $0      'A'
          4        DO_FCALL                                      0          
          5        SEND_VAR                                                 $0
          6        DO_ICALL                                         $2      
          7        SEND_VAR                                                 $2
          8        DO_ICALL                                                 
   26     9        INIT_FCALL                                               'var_dump'
         10        INIT_FCALL                                               'serialize'
         11        NEW                                              $4      'B'
         12        DO_FCALL                                      0          
         13        SEND_VAR                                                 $4
         14        DO_ICALL                                         $6      
         15        SEND_VAR                                                 $6
         16        DO_ICALL                                                 
         17      > RETURN                                                   1

Class A: [no user functions]
Class B:
Function serialize:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/t2UQ2
function name:  serialize
number of ops:  7
compiled vars:  !0 = $that
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   FETCH_THIS                                       ~1      
          1        ASSIGN                                                   !0, ~1
   13     2        INIT_FCALL                                               'serialize'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $3      
          5      > RETURN                                                   $3
   14     6*     > 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/t2UQ2
function name:  unserialize
number of ops:  2
compiled vars:  !0 = $serialized
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   RECV                                             !0      
   18     1      > RETURN                                                   null

End of function unserialize

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.57 ms | 1388 KiB | 17 Q