3v4l.org

run code in 300+ PHP versions simultaneously
<?php session_start(); $_SESSION['flag'] = 1; ?> <html> <head> </head> <body> <!-- page content here --> <?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 = 10, Position 2 = 12
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/X0TLg
function name:  (null)
number of ops:  15
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%09%09'
   10     6        FETCH_R                      global              ~3      '_SESSION'
          7        FETCH_DIM_R                                      ~4      ~3, 'flag'
          8        IS_IDENTICAL                                             ~4, 0
          9      > JMPZ                                                     ~5, ->12
   11    10    >   ECHO                                                     '%09%09%09%3Cscript+src%3D%22loggedIn.js%22%3E%3C%2Fscript%3E%0A%09%09'
         11      > JMP                                                      ->13
   13    12    >   ECHO                                                     '%09%09%09%3Cscript+src%3D%22loggedOut.js%22%3E%3C%2Fscript%3E%0A%09%09'
   15    13    >   ECHO                                                     '%09%3C%2Fbody%3E%0A%3C%2Fhtml%3E'
   16    14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.89 ms | 1395 KiB | 15 Q