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 A(); } } // 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/AurGO
function name:  (null)
number of ops:  18
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                                                 
   32    17      > RETURN                                                   1

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

End of function __construct

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
195.25 ms | 1395 KiB | 21 Q