3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tab[0] = 0xAAAAAAAAAAAAAAAA; for ($i =0; i < 5000000000000; $i++) { $tab[$i] = 'AAAAAAAAAAAAAAAAAAAA'; } class Permission implements \Serializable { protected $id = 3; public function serialize() { return serialize(array($this->id)); } public function unserialize($serialized) { list($this->id) = unserialize($serialized); } } class UserPermission implements \Serializable { public $permission; public $webshop; public function serialize() { return serialize(array($this->webshop, $this->permission)); } public function unserialize($serialized) { list($this->webshop, $this->permission) = unserialize($serialized); } } class Webshop implements \Serializable { protected $id = 0xAAAAAAAAAAAAAAAA; public function serialize() { return serialize(array($this->id)); } public function unserialize($serialized) { list($this->id) = unserialize($serialized); } } class AbstractToken implements \Serializable { public $roles; public function serialize() { return serialize(array($this->roles)); } public function unserialize($serialized) { list($this->roles) = unserialize($serialized); } } class UsernamePasswordToken extends AbstractToken { private $credentials = null; private $providerKey = null; public function serialize() { return serialize(array($this->credentials, $this->providerKey, parent::serialize())); } public function unserialize($str) { list($this->credentials, $this->providerKey, $parentStr) = unserialize($str); parent::unserialize($parentStr); } } $token = new UsernamePasswordToken(); $webshop = new Webshop; $permission = new Permission; $roles = array(); for ($i = 0; $i < 2; $i++) { $roles[$i] = new UserPermission(); $roles[$i]->webshop = $webshop; $roles[$i]->permission = $permission; } $token->roles = $roles; var_dump(unserialize(serialize($token)));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 10, Position 2 = 4
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 38
Branch analysis from position: 38
2 jumps found. (Code = 44) Position 1 = 40, Position 2 = 27
Branch analysis from position: 40
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 27
2 jumps found. (Code = 44) Position 1 = 40, Position 2 = 27
Branch analysis from position: 40
Branch analysis from position: 27
Branch analysis from position: 4
2 jumps found. (Code = 44) Position 1 = 10, Position 2 = 4
Branch analysis from position: 10
Branch analysis from position: 4
filename:       /in/kWPnO
function name:  (null)
number of ops:  52
compiled vars:  !0 = $tab, !1 = $i, !2 = $token, !3 = $webshop, !4 = $permission, !5 = $roles
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN_DIM                                               !0, 0
          1        OP_DATA                                                  1.22978e+19
    4     2        ASSIGN                                                   !1, 0
          3      > JMP                                                      ->7
    5     4    >   ASSIGN_DIM                                               !0, !1
          5        OP_DATA                                                  'AAAAAAAAAAAAAAAAAAAA'
    4     6        PRE_INC                                                  !1
          7    >   FETCH_CONSTANT                                   ~10     'i'
          8        IS_SMALLER                                               ~10, 5000000000000
          9      > JMPNZ                                                    ~11, ->4
    7    10    >   DECLARE_CLASS                                            'permission'
   20    11        DECLARE_CLASS                                            'userpermission'
   34    12        DECLARE_CLASS                                            'webshop'
   47    13        DECLARE_CLASS                                            'abstracttoken'
   60    14        DECLARE_CLASS                                            'usernamepasswordtoken', 'abstracttoken'
   76    15        NEW                                              $12     'UsernamePasswordToken'
         16        DO_FCALL                                      0          
         17        ASSIGN                                                   !2, $12
   77    18        NEW                                              $15     'Webshop'
         19        DO_FCALL                                      0          
         20        ASSIGN                                                   !3, $15
   78    21        NEW                                              $18     'Permission'
         22        DO_FCALL                                      0          
         23        ASSIGN                                                   !4, $18
   79    24        ASSIGN                                                   !5, <array>
   80    25        ASSIGN                                                   !1, 0
         26      > JMP                                                      ->38
   81    27    >   NEW                                              $24     'UserPermission'
         28        DO_FCALL                                      0          
         29        ASSIGN_DIM                                               !5, !1
         30        OP_DATA                                                  $24
   82    31        FETCH_DIM_W                                      $26     !5, !1
         32        ASSIGN_OBJ                                               $26, 'webshop'
         33        OP_DATA                                                  !3
   83    34        FETCH_DIM_W                                      $28     !5, !1
         35        ASSIGN_OBJ                                               $28, 'permission'
         36        OP_DATA                                                  !4
   80    37        PRE_INC                                                  !1
         38    >   IS_SMALLER                                               !1, 2
         39      > JMPNZ                                                    ~31, ->27
   85    40    >   ASSIGN_OBJ                                               !2, 'roles'
         41        OP_DATA                                                  !5
   86    42        INIT_FCALL                                               'var_dump'
         43        INIT_FCALL                                               'unserialize'
         44        INIT_FCALL                                               'serialize'
         45        SEND_VAR                                                 !2
         46        DO_ICALL                                         $33     
         47        SEND_VAR                                                 $33
         48        DO_ICALL                                         $34     
         49        SEND_VAR                                                 $34
         50        DO_ICALL                                                 
         51      > RETURN                                                   1

Class Permission:
Function serialize:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kWPnO
function name:  serialize
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   INIT_FCALL                                               'serialize'
          1        FETCH_OBJ_R                                      ~0      'id'
          2        INIT_ARRAY                                       ~1      ~0
          3        SEND_VAL                                                 ~1
          4        DO_ICALL                                         $2      
          5      > RETURN                                                   $2
   12     6*     > 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/kWPnO
function name:  unserialize
number of ops:  9
compiled vars:  !0 = $serialized
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   RECV                                             !0      
   15     1        INIT_FCALL                                               'unserialize'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $1      
          4        FETCH_LIST_R                                     $2      $1, 0
          5        ASSIGN_OBJ                                               'id'
          6        OP_DATA                                                  $2
          7        FREE                                                     $1
   16     8      > RETURN                                                   null

End of function unserialize

End of class Permission.

Class UserPermission:
Function serialize:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kWPnO
function name:  serialize
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   26     0  E >   INIT_FCALL                                               'serialize'
          1        FETCH_OBJ_R                                      ~0      'webshop'
          2        INIT_ARRAY                                       ~1      ~0
          3        FETCH_OBJ_R                                      ~2      'permission'
          4        ADD_ARRAY_ELEMENT                                ~1      ~2
          5        SEND_VAL                                                 ~1
          6        DO_ICALL                                         $3      
          7      > RETURN                                                   $3
   27     8*     > 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/kWPnO
function name:  unserialize
number of ops:  12
compiled vars:  !0 = $serialized
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   28     0  E >   RECV                                             !0      
   30     1        INIT_FCALL                                               'unserialize'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $1      
          4        FETCH_LIST_R                                     $2      $1, 0
          5        ASSIGN_OBJ                                               'webshop'
          6        OP_DATA                                                  $2
          7        FETCH_LIST_R                                     $4      $1, 1
          8        ASSIGN_OBJ                                               'permission'
          9        OP_DATA                                                  $4
         10        FREE                                                     $1
   31    11      > RETURN                                                   null

End of function unserialize

End of class UserPermission.

Class Webshop:
Function serialize:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kWPnO
function name:  serialize
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   38     0  E >   INIT_FCALL                                               'serialize'
          1        FETCH_OBJ_R                                      ~0      'id'
          2        INIT_ARRAY                                       ~1      ~0
          3        SEND_VAL                                                 ~1
          4        DO_ICALL                                         $2      
          5      > RETURN                                                   $2
   39     6*     > 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/kWPnO
function name:  unserialize
number of ops:  9
compiled vars:  !0 = $serialized
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   40     0  E >   RECV                                             !0      
   42     1        INIT_FCALL                                               'unserialize'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $1      
          4        FETCH_LIST_R                                     $2      $1, 0
          5        ASSIGN_OBJ                                               'id'
          6        OP_DATA                                                  $2
          7        FREE                                                     $1
   43     8      > RETURN                                                   null

End of function unserialize

End of class Webshop.

Class AbstractToken:
Function serialize:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kWPnO
function name:  serialize
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   52     0  E >   INIT_FCALL                                               'serialize'
          1        FETCH_OBJ_R                                      ~0      'roles'
          2        INIT_ARRAY                                       ~1      ~0
          3        SEND_VAL                                                 ~1
          4        DO_ICALL                                         $2      
          5      > RETURN                                                   $2
   53     6*     > 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/kWPnO
function name:  unserialize
number of ops:  9
compiled vars:  !0 = $serialized
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   54     0  E >   RECV                                             !0      
   56     1        INIT_FCALL                                               'unserialize'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $1      
          4        FETCH_LIST_R                                     $2      $1, 0
          5        ASSIGN_OBJ                                               'roles'
          6        OP_DATA                                                  $2
          7        FREE                                                     $1
   57     8      > RETURN                                                   null

End of function unserialize

End of class AbstractToken.

Class UsernamePasswordToken:
Function serialize:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kWPnO
function name:  serialize
number of ops:  12
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   66     0  E >   INIT_FCALL                                               'serialize'
          1        FETCH_OBJ_R                                      ~0      'credentials'
          2        INIT_ARRAY                                       ~1      ~0
          3        FETCH_OBJ_R                                      ~2      'providerKey'
          4        ADD_ARRAY_ELEMENT                                ~1      ~2
          5        INIT_STATIC_METHOD_CALL                                  'serialize'
          6        DO_FCALL                                      0  $3      
          7        ADD_ARRAY_ELEMENT                                ~1      $3
          8        SEND_VAL                                                 ~1
          9        DO_ICALL                                         $4      
         10      > RETURN                                                   $4
   67    11*     > 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/kWPnO
function name:  unserialize
number of ops:  17
compiled vars:  !0 = $str, !1 = $parentStr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   69     0  E >   RECV                                             !0      
   71     1        INIT_FCALL                                               'unserialize'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $2      
          4        FETCH_LIST_R                                     $3      $2, 0
          5        ASSIGN_OBJ                                               'credentials'
          6        OP_DATA                                                  $3
          7        FETCH_LIST_R                                     $5      $2, 1
          8        ASSIGN_OBJ                                               'providerKey'
          9        OP_DATA                                                  $5
         10        FETCH_LIST_R                                     $7      $2, 2
         11        ASSIGN                                                   !1, $7
         12        FREE                                                     $2
   72    13        INIT_STATIC_METHOD_CALL                                  'unserialize'
         14        SEND_VAR_EX                                              !1
         15        DO_FCALL                                      0          
   73    16      > RETURN                                                   null

End of function unserialize

End of class UsernamePasswordToken.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.5 ms | 1412 KiB | 19 Q