3v4l.org

run code in 300+ PHP versions simultaneously
<?php session_start(); $_SESSION['flag'] = 1; ?> <html> <head> </head> <body> <!-- page content here --> <?php var_dump($_SESSION['flag']); ?> <?php if ($_SESSION['flag'] === 0): ?> <script src="loggedIn.js"></script> <?php else: ?> <script src="loggedOut.js"></script> <?php endif; ?> </body> </html>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 18
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SeKjG
function name:  (null)
number of ops:  21
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'session_start'
          1        DO_ICALL                                                 
    3     2        FETCH_W                      global              $1      '_SESSION'
          3        ASSIGN_DIM                                               $1, 'flag'
          4        OP_DATA                                                  1
    5     5        ECHO                                                     '%3Chtml%3E%0A%09%3Chead%3E%0A%09%3C%2Fhead%3E%0A%09%3Cbody%3E%0A%09%09%3C%21--+page+content+here+--%3E%0A%0A%09%09'
   11     6        INIT_FCALL                                               'var_dump'
          7        FETCH_R                      global              ~3      '_SESSION'
          8        FETCH_DIM_R                                      ~4      ~3, 'flag'
          9        SEND_VAL                                                 ~4
         10        DO_ICALL                                                 
   12    11        ECHO                                                     '%0A%09%09'
   13    12        FETCH_R                      global              ~6      '_SESSION'
         13        FETCH_DIM_R                                      ~7      ~6, 'flag'
         14        IS_IDENTICAL                                             ~7, 0
         15      > JMPZ                                                     ~8, ->18
   14    16    >   ECHO                                                     '%09%09%09%3Cscript+src%3D%22loggedIn.js%22%3E%3C%2Fscript%3E%0A%09%09'
         17      > JMP                                                      ->19
   16    18    >   ECHO                                                     '%09%09%09%3Cscript+src%3D%22loggedOut.js%22%3E%3C%2Fscript%3E%0A%09%09'
   18    19    >   ECHO                                                     '%09%3C%2Fbody%3E%0A%3C%2Fhtml%3E'
   19    20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.23 ms | 1395 KiB | 17 Q