3v4l.org

run code in 300+ PHP versions simultaneously
<?php class X {}; class Y implements Serializable{ public $data = array(); public function serialize() { return serialize($this->data); } public function unserialize($data) { $this->data = unserialize($data); } }; $x = new X(); $y = new Y(); var_dump(serialize($x)); var_dump(serialize($y));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AdTb8
function name:  (null)
number of ops:  20
compiled vars:  !0 = $x, !1 = $y
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   DECLARE_CLASS                                            'y'
   14     1        NEW                                              $2      'X'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
   15     4        NEW                                              $5      'Y'
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !1, $5
   16     7        INIT_FCALL                                               'var_dump'
          8        INIT_FCALL                                               'serialize'
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                         $8      
         11        SEND_VAR                                                 $8
         12        DO_ICALL                                                 
   17    13        INIT_FCALL                                               'var_dump'
         14        INIT_FCALL                                               'serialize'
         15        SEND_VAR                                                 !1
         16        DO_ICALL                                         $10     
         17        SEND_VAR                                                 $10
         18        DO_ICALL                                                 
         19      > RETURN                                                   1

Class X: [no user functions]
Class Y:
Function serialize:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AdTb8
function name:  serialize
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                               'serialize'
          1        FETCH_OBJ_R                                      ~0      'data'
          2        SEND_VAL                                                 ~0
          3        DO_ICALL                                         $1      
          4      > RETURN                                                   $1
    9     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/AdTb8
function name:  unserialize
number of ops:  7
compiled vars:  !0 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
   11     1        INIT_FCALL                                               'unserialize'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $2      
          4        ASSIGN_OBJ                                               'data'
          5        OP_DATA                                                  $2
   12     6      > RETURN                                                   null

End of function unserialize

End of class Y.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.02 ms | 1396 KiB | 19 Q