3v4l.org

run code in 500+ PHP versions simultaneously
<?php class A { public $e = array(); } class Token implements \Serializable { public function serialize() { $c = new A; for ($i = 0; $i < 4; $i++) { $e = new A; $c->e[] = $e; $e->e = $c->e; } return serialize(array(serialize($c))); } public function unserialize($str) { $r = unserialize($str); $r = unserialize($r[0]); } } $token = new Token; $token = serialize($token); unserialize($token);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DRlHA
function name:  (null)
number of ops:  12
compiled vars:  !0 = $token
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    7     0  E >   DECLARE_CLASS                                                'token'
   29     1        NEW                                                  $1      'Token'
          2        DO_FCALL                                          0          
          3        ASSIGN                                                       !0, $1
   30     4        INIT_FCALL                                                   'serialize'
          5        SEND_VAR                                                     !0
          6        DO_ICALL                                             $4      
          7        ASSIGN                                                       !0, $4
   32     8        INIT_FCALL                                                   'unserialize'
          9        SEND_VAR                                                     !0
         10        DO_ICALL                                                     
         11      > RETURN                                                       1

Class A: [no user functions]
Class Token:
Function serialize:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
2 jumps found. (Code = 44) Position 1 = 17, Position 2 = 5
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 17, Position 2 = 5
Branch analysis from position: 17
Branch analysis from position: 5
filename:       /in/DRlHA
function name:  serialize
number of ops:  26
compiled vars:  !0 = $c, !1 = $i, !2 = $e
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   10     0  E >   NEW                                                  $3      'A'
          1        DO_FCALL                                          0          
          2        ASSIGN                                                       !0, $3
   12     3        ASSIGN                                                       !1, 0
          4      > JMP                                                          ->15
   14     5    >   NEW                                                  $7      'A'
          6        DO_FCALL                                          0          
          7        ASSIGN                                                       !2, $7
   15     8        FETCH_OBJ_W                                          $10     !0, 'e'
          9        ASSIGN_DIM                                                   $10
         10        OP_DATA                                                      !2
   16    11        FETCH_OBJ_R                                          ~13     !0, 'e'
         12        ASSIGN_OBJ                                                   !2, 'e'
         13        OP_DATA                                                      ~13
   12    14        PRE_INC                                                      !1
         15    >   IS_SMALLER                                                   !1, 4
         16      > JMPNZ                                                        ~15, ->5
   19    17    >   INIT_FCALL                                                   'serialize'
         18        INIT_FCALL                                                   'serialize'
         19        SEND_VAR                                                     !0
         20        DO_ICALL                                             $16     
         21        INIT_ARRAY                                           ~17     $16
         22        SEND_VAL                                                     ~17
         23        DO_ICALL                                             $18     
         24      > RETURN                                                       $18
   20    25*     > 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/DRlHA
function name:  unserialize
number of ops:  11
compiled vars:  !0 = $str, !1 = $r
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   22     0  E >   RECV                                                 !0      
   24     1        INIT_FCALL                                                   'unserialize'
          2        SEND_VAR                                                     !0
          3        DO_ICALL                                             $2      
          4        ASSIGN                                                       !1, $2
   25     5        INIT_FCALL                                                   'unserialize'
          6        FETCH_DIM_R                                          ~4      !1, 0
          7        SEND_VAL                                                     ~4
          8        DO_ICALL                                             $5      
          9        ASSIGN                                                       !1, $5
   26    10      > RETURN                                                       null

End of function unserialize

End of class Token.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
190.42 ms | 2798 KiB | 15 Q