3v4l.org

run code in 300+ PHP versions simultaneously
<?php // @see https://bugs.php.net/bug.php?id=71972 session_id('sessiontest'); session_start(); $_SESSION['boogie'] = 1; $_SESSION['obj1'] = new stdClass(); for ( $x=2; $x < 20; $x++) { cyclic_ref($x); } function cyclic_ref($num) { $_SESSION['obj'.$num] = new stdClass(); $_SESSION['obj'.$num]->test = new stdClass(); $_SESSION['obj'.$num]->obj1 = $_SESSION['obj1']; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 15
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 15
Branch analysis from position: 21
Branch analysis from position: 15
filename:       /in/CgdNh
function name:  (null)
number of ops:  22
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'session_id'
          1        SEND_VAL                                                 'sessiontest'
          2        DO_ICALL                                                 
    4     3        INIT_FCALL                                               'session_start'
          4        DO_ICALL                                                 
    6     5        FETCH_W                      global              $3      '_SESSION'
          6        ASSIGN_DIM                                               $3, 'boogie'
          7        OP_DATA                                                  1
    7     8        NEW                                              $7      'stdClass'
          9        DO_FCALL                                      0          
         10        FETCH_W                      global              $5      '_SESSION'
         11        ASSIGN_DIM                                               $5, 'obj1'
         12        OP_DATA                                                  $7
    8    13        ASSIGN                                                   !0, 2
         14      > JMP                                                      ->19
    9    15    >   INIT_FCALL_BY_NAME                                       'cyclic_ref'
         16        SEND_VAR_EX                                              !0
         17        DO_FCALL                                      0          
    8    18        PRE_INC                                                  !0
         19    >   IS_SMALLER                                               !0, 20
         20      > JMPNZ                                                    ~12, ->15
   16    21    > > RETURN                                                   1

Function cyclic_ref:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CgdNh
function name:  cyclic_ref
number of ops:  22
compiled vars:  !0 = $num
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
   13     1        CONCAT                                           ~2      'obj', !0
          2        NEW                                              $4      'stdClass'
          3        DO_FCALL                                      0          
          4        FETCH_W                      global              $1      '_SESSION'
          5        ASSIGN_DIM                                               $1, ~2
          6        OP_DATA                                                  $4
   14     7        CONCAT                                           ~7      'obj', !0
          8        NEW                                              $10     'stdClass'
          9        DO_FCALL                                      0          
         10        FETCH_W                      global              $6      '_SESSION'
         11        FETCH_DIM_W                                      $8      $6, ~7
         12        ASSIGN_OBJ                                               $8, 'test'
         13        OP_DATA                                                  $10
   15    14        CONCAT                                           ~13     'obj', !0
         15        FETCH_R                      global              ~16     '_SESSION'
         16        FETCH_DIM_R                                      ~17     ~16, 'obj1'
         17        FETCH_W                      global              $12     '_SESSION'
         18        FETCH_DIM_W                                      $14     $12, ~13
         19        ASSIGN_OBJ                                               $14, 'obj1'
         20        OP_DATA                                                  ~17
   16    21      > RETURN                                                   null

End of function cyclic_ref

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
127.26 ms | 1004 KiB | 15 Q