3v4l.org

run code in 300+ PHP versions simultaneously
<?php session_start(); function s(){ if (isset($_SESSION['active'])) { $_SESSION['active']='30'; } else { $_SESSION['active'] = '40'; } } echo s()['active'];
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bgji0
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'session_start'
          1        DO_ICALL                                                 
   13     2        INIT_FCALL                                               's'
          3        DO_FCALL                                      0  $1      
          4        FETCH_DIM_R                                      ~2      $1, 'active'
          5        ECHO                                                     ~2
          6      > RETURN                                                   1

Function s:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 7
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bgji0
function name:  s
number of ops:  11
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   FETCH_IS                                         ~0      '_SESSION'
          1        ISSET_ISEMPTY_DIM_OBJ                         0          ~0, 'active'
          2      > JMPZ                                                     ~1, ->7
    6     3    >   FETCH_W                      global              $2      '_SESSION'
          4        ASSIGN_DIM                                               $2, 'active'
          5        OP_DATA                                                  '30'
          6      > JMP                                                      ->10
   10     7    >   FETCH_W                      global              $4      '_SESSION'
          8        ASSIGN_DIM                                               $4, 'active'
          9        OP_DATA                                                  '40'
   12    10    > > RETURN                                                   null

End of function s

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
195.66 ms | 1402 KiB | 16 Q