3v4l.org

run code in 300+ PHP versions simultaneously
<?php header('Content-Type: text/html'); if (isset($_SESSION['isLoggedIn']) && $_SESSION['isLoggedIn']===TRUE ) { echo '<a href="html/login.php">Log in</a>'; } else { echo '<a href="html/logout.php">Log out</a>'; } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 6, Position 2 = 10
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 13
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
filename:       /in/qUXvW
function name:  (null)
number of ops:  15
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'header'
          1        SEND_VAL                                                 'Content-Type%3A+text%2Fhtml'
          2        DO_ICALL                                                 
    3     3        FETCH_IS                                         ~1      '_SESSION'
          4        ISSET_ISEMPTY_DIM_OBJ                         0  ~2      ~1, 'isLoggedIn'
          5      > JMPZ_EX                                          ~2      ~2, ->10
          6    >   FETCH_R                      global              ~3      '_SESSION'
          7        FETCH_DIM_R                                      ~4      ~3, 'isLoggedIn'
          8        TYPE_CHECK                                    8  ~5      ~4
          9        BOOL                                             ~2      ~5
         10    > > JMPZ                                                     ~2, ->13
    5    11    >   ECHO                                                     '%3Ca+href%3D%22html%2Flogin.php%22%3ELog+in%3C%2Fa%3E'
         12      > JMP                                                      ->14
    9    13    >   ECHO                                                     '%3Ca+href%3D%22html%2Flogout.php%22%3ELog+out%3C%2Fa%3E'
   11    14    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.39 ms | 1386 KiB | 15 Q