3v4l.org

run code in 300+ PHP versions simultaneously
<?php ini_set("session.use_cookies", false); class A { public $b; public function __construct() { $this->b = new B(); } } class B { public $a; public function __construct() { $this->A = new A(); } } $a = new A(); session_start(); $id = session_id(); $_SESSION['test'] = $a; session_write_close(); session_id('boo'); session_start(); session_write_close(); session_id($id); session_start(); echo serialize($_SESSION['test']);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/K92rL
function name:  (null)
number of ops:  36
compiled vars:  !0 = $a, !1 = $id
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'ini_set'
          1        SEND_VAL                                                 'session.use_cookies'
          2        SEND_VAL                                                 <false>
          3        DO_ICALL                                                 
   19     4        NEW                                              $3      'A'
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !0, $3
   20     7        INIT_FCALL                                               'session_start'
          8        DO_ICALL                                                 
   21     9        INIT_FCALL                                               'session_id'
         10        DO_ICALL                                         $7      
         11        ASSIGN                                                   !1, $7
   22    12        FETCH_W                      global              $9      '_SESSION'
         13        ASSIGN_DIM                                               $9, 'test'
         14        OP_DATA                                                  !0
   23    15        INIT_FCALL                                               'session_write_close'
         16        DO_ICALL                                                 
   25    17        INIT_FCALL                                               'session_id'
         18        SEND_VAL                                                 'boo'
         19        DO_ICALL                                                 
   26    20        INIT_FCALL                                               'session_start'
         21        DO_ICALL                                                 
   27    22        INIT_FCALL                                               'session_write_close'
         23        DO_ICALL                                                 
   29    24        INIT_FCALL                                               'session_id'
         25        SEND_VAR                                                 !1
         26        DO_ICALL                                                 
   30    27        INIT_FCALL                                               'session_start'
         28        DO_ICALL                                                 
   32    29        INIT_FCALL                                               'serialize'
         30        FETCH_R                      global              ~17     '_SESSION'
         31        FETCH_DIM_R                                      ~18     ~17, 'test'
         32        SEND_VAL                                                 ~18
         33        DO_ICALL                                         $19     
         34        ECHO                                                     $19
         35      > RETURN                                                   1

Class A:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/K92rL
function name:  __construct
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   NEW                                              $1      'B'
          1        DO_FCALL                                      0          
          2        ASSIGN_OBJ                                               'b'
          3        OP_DATA                                                  $1
    8     4      > RETURN                                                   null

End of function __construct

End of class A.

Class B:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/K92rL
function name:  __construct
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   NEW                                              $1      'A'
          1        DO_FCALL                                      0          
          2        ASSIGN_OBJ                                               'A'
          3        OP_DATA                                                  $1
   16     4      > RETURN                                                   null

End of function __construct

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.39 ms | 1400 KiB | 23 Q