3v4l.org

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

Class A:
Function serialize:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RFoGK
function name:  serialize
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E > > RETURN                                                   'foo'
    6     1*     > 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/RFoGK
function name:  unserialize
number of ops:  2
compiled vars:  !0 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
    9     1      > RETURN                                                   null

End of function unserialize

End of class A.

Class B:
Function serialize:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RFoGK
function name:  serialize
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E > > RETURN                                                   'bar'
   15     1*     > RETURN                                                   null

End of function serialize

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
178.72 ms | 1395 KiB | 17 Q