3v4l.org

run code in 300+ PHP versions simultaneously
<?php session_start(); if ((!isset($_SESSION["username"]) && !isset($_SESSION["s1"]) && !isset($_SESSION["s2"]))) { $_SESSION["firstrun"] = "true"; $_POST = array(); } ?> <!DOCTYPE html> <html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <script src="jquery-1.11.0.js"></script> </head> <script> $(function() { $('#enter').click(function() { console.log("clicky"); //Debug //Get value from the inputs var user_input = $("#username").val(); var s1_input = $("#s1").val(); var s2_input = $("#s2").val(); //Make a jquery post to the session.php with the users data and then redirect to the next page jQuery.post("session.php", {username:user_input, s1:s1_input, s2:s2_input}, function(data){ if (data == "true") { window.location.replace("strings.php"); // Javascript redirect } }); }); }); </script> <body> Enter a username: <input type="text" name="username" id="username" value=""/> <br/> <br/> Pick a string: <input type="text" name="s1" id="s1" value=""/> <br/> <br/> Pick another string: <input type="text" name="s2" id="s2" value=""/> <br/> <br/> <input type="button" name="enter" id="enter" value="Go play with strings!"/> <br/> <br/> </body> </html>
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 = 46) Position 1 = 11, Position 2 = 15
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 21
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
Branch analysis from position: 15
Branch analysis from position: 10
filename:       /in/BaVg1
function name:  (null)
number of ops:  23
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_IS                                         ~1      '_SESSION'
          3        ISSET_ISEMPTY_DIM_OBJ                         0  ~2      ~1, 'username'
          4        BOOL_NOT                                         ~3      ~2
          5      > JMPZ_EX                                          ~3      ~3, ->10
          6    >   FETCH_IS                                         ~4      '_SESSION'
          7        ISSET_ISEMPTY_DIM_OBJ                         0  ~5      ~4, 's1'
          8        BOOL_NOT                                         ~6      ~5
          9        BOOL                                             ~3      ~6
         10    > > JMPZ_EX                                          ~3      ~3, ->15
         11    >   FETCH_IS                                         ~7      '_SESSION'
         12        ISSET_ISEMPTY_DIM_OBJ                         0  ~8      ~7, 's2'
         13        BOOL_NOT                                         ~9      ~8
         14        BOOL                                             ~3      ~9
         15    > > JMPZ                                                     ~3, ->21
    4    16    >   FETCH_W                      global              $10     '_SESSION'
         17        ASSIGN_DIM                                               $10, 'firstrun'
         18        OP_DATA                                                  'true'
    5    19        FETCH_W                      global              $12     '_POST'
         20        ASSIGN                                                   $12, <array>
    8    21    >   ECHO                                                     '%0A%3C%21DOCTYPE+html%3E%0A%3Chtml%3E%3Chead%3E%3Cmeta+http-equiv%3D%22Content-Type%22+content%3D%22text%2Fhtml%3B+charset%3Dutf-8%22%3E%0A%3Cscript+src%3D%22jquery-1.11.0.js%22%3E%3C%2Fscript%3E%0A%0A%3C%2Fhead%3E%0A%0A%3Cscript%3E%0A%24%28function%28%29+%7B%0A%09%24%28%27%23enter%27%29.click%28function%28%29+%7B%0A%09console.log%28%22clicky%22%29%3B+%2F%2FDebug%0A%0A%09%2F%2FGet+value+from+the+inputs%09%0A%09var+user_input+%3D+%24%28%22%23username%22%29.val%28%29%3B%0A%09var+s1_input+%3D+%24%28%22%23s1%22%29.val%28%29%3B%0A%09var+s2_input+%3D+%24%28%22%23s2%22%29.val%28%29%3B%0A%0A%09%2F%2FMake+a+jquery+post+to+the+session.php+with+the+users+data+and+then+redirect+to+the+next+page%0A%09%0A%09jQuery.post%28%22session.php%22%2C+%7Busername%3Auser_input%2C+s1%3As1_input%2C+s2%3As2_input%7D%2C+function%28data%29%7B%0A%09%09if+%28data+%3D%3D+%22true%22%29+%7B%0A%09%09%09window.location.replace%28%22strings.php%22%29%3B+%2F%2F+Javascript+redirect%0A%09%09%09%7D%09%0A%09%09%7D%29%3B%0A%09%7D%29%3B%0A%7D%29%3B%09%0A%3C%2Fscript%3E%0A%0A%3Cbody%3E%0A%0AEnter+a+username%3A%0A%3Cinput+type%3D%22text%22+name%3D%22username%22+id%3D%22username%22+value%3D%22%22%2F%3E%0A%0A%3Cbr%2F%3E+%3Cbr%2F%3E%0A%0APick+a+string%3A%0A%3Cinput+type%3D%22text%22+name%3D%22s1%22+id%3D%22s1%22+value%3D%22%22%2F%3E%0A%0A%3Cbr%2F%3E+%3Cbr%2F%3E%0A%0APick+another+string%3A%0A%3Cinput+type%3D%22text%22+name%3D%22s2%22+id%3D%22s2%22+value%3D%22%22%2F%3E%0A%0A%0A%3Cbr%2F%3E+%3Cbr%2F%3E%0A%3Cinput+type%3D%22button%22+name%3D%22enter%22+id%3D%22enter%22+value%3D%22Go+play+with+strings%21%22%2F%3E%0A%0A%3Cbr%2F%3E+%3Cbr%2F%3E%0A%0A%0A%0A%3C%2Fbody%3E%0A%3C%2Fhtml%3E'
   60    22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
181.24 ms | 1400 KiB | 15 Q