3v4l.org

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

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

End of function unserialize

End of class C.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.47 ms | 1395 KiB | 19 Q