3v4l.org

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

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

End of function unserialize

End of class kissa.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
188.46 ms | 1395 KiB | 21 Q