3v4l.org

run code in 300+ PHP versions simultaneously
<?php ini_set('display_errors', 1); error_reporting(E_ALL); $time = microtime(); $time = explode(' ', $time); $time = $time[1] + $time[0]; $start = $time; if (isset($_POST['request'])) { define("DB_HOST","mysql117.loopia.se"); define("DB_USER","normal@i103189"); define("DB_PASS","KungMicke87"); define("DB_NAME","indiehjaerta_com"); // Connect to MySQLi $sqli = mysqli_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME) or die("Error: ".mysqli_error($sqli)); // Check connection if (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); } $email = mysqli_real_escape_string($sqli, $_POST['email']); $timestamp = date('Y-m-d H:i:s'); $token = sha1(uniqid($email, true)); $url = "http://www.indiehjaerta.com/getpassword.php?token=$token"; //$message = "Press think link $url to reset your password.\n\n If you didn't request a password change please discard this e-mail."; $message = "This function is currently not working :("; $headers = 'From: [indiehjaerta.com] Admin <no-reply@indiehjaerta.com>' . "\r\n"; mail($email, "[indiehjaerta.com] Password Reset", $message, $headers); $ip = ip2long($_SERVER['REMOTE_ADDR']); $query = mysqli_query($sqli,"INSERT INTO passwordrequest (`ipaddress`, `email`, `timestamp`, `token`) VALUES ('$ip', '$email', '$timestamp', '$token')"); } ?> <html> <head> <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" /> <title>indiehjaerta.com - Request Password</title> <link href="style_test.css" rel="stylesheet" type="text/css" /> </head> <body> <a href="login.php">Login<a/> - <a href="admin.php">Admin<a/> - <a href="members.php">Members<a/> - <a href="register.php">Register<a/> - <a href="blog.php">Blog<a/> - <a href="news.php">News<a/> - <a href="event.php">Event<a/> - <a href="forum.php">Forum<a/> <br /> <br /> <?php if (isset($_POST['request'])) { ?> <table width="300" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC"> <tr> <td> <table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF"> <tr> <td colspan="3"><strong>E-mail sent to <?php echo $email ?> with details on how to change password.</strong></td> </tr> </table> </td> </tr> </table> <?php } else { ?> <table width="300" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC"> <tr> <form method="post" action=""> <td> <table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF"> <tr> <td colspan="3"><strong>Password request.</strong></td> </tr> <tr> <td width="78"><strong>E-mail</strong></td> <td width="6">:</td> <td width="294"><input name="email" type="text" id="email"></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td><input type="submit" name="request" value="Request"></td> </tr> </table> </td> </form> </tr> </table> <?php } $time = microtime(); $time = explode(' ', $time); $time = $time[1] + $time[0]; $finish = $time; $total_time = round(($finish - $start), 4); echo '<span class="text">Page generated in '.$total_time.' seconds.</span><br />'; ?> </body> </html>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 23, Position 2 = 115
Branch analysis from position: 23
2 jumps found. (Code = 47) Position 1 = 51, Position 2 = 57
Branch analysis from position: 51
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 57
2 jumps found. (Code = 43) Position 1 = 60, Position 2 = 64
Branch analysis from position: 60
2 jumps found. (Code = 43) Position 1 = 119, Position 2 = 123
Branch analysis from position: 119
1 jumps found. (Code = 42) Position 1 = 124
Branch analysis from position: 124
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 123
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 64
Branch analysis from position: 115
filename:       /in/dnbdq
function name:  (null)
number of ops:  148
compiled vars:  !0 = $time, !1 = $start, !2 = $sqli, !3 = $email, !4 = $timestamp, !5 = $token, !6 = $url, !7 = $message, !8 = $headers, !9 = $ip, !10 = $query, !11 = $finish, !12 = $total_time
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'ini_set'
          1        SEND_VAL                                                 'display_errors'
          2        SEND_VAL                                                 1
          3        DO_ICALL                                                 
    3     4        INIT_FCALL                                               'error_reporting'
          5        SEND_VAL                                                 32767
          6        DO_ICALL                                                 
    5     7        INIT_FCALL                                               'microtime'
          8        DO_ICALL                                         $15     
          9        ASSIGN                                                   !0, $15
    6    10        INIT_FCALL                                               'explode'
         11        SEND_VAL                                                 '+'
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                         $17     
         14        ASSIGN                                                   !0, $17
    7    15        FETCH_DIM_R                                      ~19     !0, 1
         16        FETCH_DIM_R                                      ~20     !0, 0
         17        ADD                                              ~21     ~19, ~20
         18        ASSIGN                                                   !0, ~21
    8    19        ASSIGN                                                   !1, !0
   10    20        FETCH_IS                                         ~24     '_POST'
         21        ISSET_ISEMPTY_DIM_OBJ                         0          ~24, 'request'
         22      > JMPZ                                                     ~25, ->115
   12    23    >   INIT_FCALL                                               'define'
         24        SEND_VAL                                                 'DB_HOST'
         25        SEND_VAL                                                 'mysql117.loopia.se'
         26        DO_ICALL                                                 
   13    27        INIT_FCALL                                               'define'
         28        SEND_VAL                                                 'DB_USER'
         29        SEND_VAL                                                 'normal%40i103189'
         30        DO_ICALL                                                 
   14    31        INIT_FCALL                                               'define'
         32        SEND_VAL                                                 'DB_PASS'
         33        SEND_VAL                                                 'KungMicke87'
         34        DO_ICALL                                                 
   15    35        INIT_FCALL                                               'define'
         36        SEND_VAL                                                 'DB_NAME'
         37        SEND_VAL                                                 'indiehjaerta_com'
         38        DO_ICALL                                                 
   18    39        INIT_FCALL_BY_NAME                                       'mysqli_connect'
         40        FETCH_CONSTANT                                   ~30     'DB_HOST'
         41        SEND_VAL_EX                                              ~30
         42        FETCH_CONSTANT                                   ~31     'DB_USER'
         43        SEND_VAL_EX                                              ~31
         44        FETCH_CONSTANT                                   ~32     'DB_PASS'
         45        SEND_VAL_EX                                              ~32
         46        FETCH_CONSTANT                                   ~33     'DB_NAME'
         47        SEND_VAL_EX                                              ~33
         48        DO_FCALL                                      0  $34     
         49        ASSIGN                                           ~35     !2, $34
         50      > JMPNZ_EX                                         ~35     ~35, ->57
         51    >   INIT_FCALL_BY_NAME                                       'mysqli_error'
         52        SEND_VAR_EX                                              !2
         53        DO_FCALL                                      0  $36     
         54        CONCAT                                           ~37     'Error%3A+', $36
         55      > EXIT                                                     ~37
         56*       BOOL                                             ~35     <true>
   20    57    >   INIT_FCALL_BY_NAME                                       'mysqli_connect_errno'
         58        DO_FCALL                                      0  $38     
         59      > JMPZ                                                     $38, ->64
   22    60    >   INIT_FCALL_BY_NAME                                       'mysqli_connect_error'
         61        DO_FCALL                                      0  $39     
         62        CONCAT                                           ~40     'Failed+to+connect+to+MySQL%3A+', $39
         63        ECHO                                                     ~40
   25    64    >   INIT_FCALL_BY_NAME                                       'mysqli_real_escape_string'
         65        SEND_VAR_EX                                              !2
         66        CHECK_FUNC_ARG                                           
         67        FETCH_FUNC_ARG               global              $41     '_POST'
         68        FETCH_DIM_FUNC_ARG                               $42     $41, 'email'
         69        SEND_FUNC_ARG                                            $42
         70        DO_FCALL                                      0  $43     
         71        ASSIGN                                                   !3, $43
   26    72        INIT_FCALL                                               'date'
         73        SEND_VAL                                                 'Y-m-d+H%3Ai%3As'
         74        DO_ICALL                                         $45     
         75        ASSIGN                                                   !4, $45
   28    76        INIT_FCALL                                               'sha1'
         77        INIT_FCALL                                               'uniqid'
         78        SEND_VAR                                                 !3
         79        SEND_VAL                                                 <true>
         80        DO_ICALL                                         $47     
         81        SEND_VAR                                                 $47
         82        DO_ICALL                                         $48     
         83        ASSIGN                                                   !5, $48
   30    84        NOP                                                      
         85        FAST_CONCAT                                      ~50     'http%3A%2F%2Fwww.indiehjaerta.com%2Fgetpassword.php%3Ftoken%3D', !5
         86        ASSIGN                                                   !6, ~50
   33    87        ASSIGN                                                   !7, 'This+function+is+currently+not+working+%3A%28'
   35    88        ASSIGN                                                   !8, 'From%3A+%5Bindiehjaerta.com%5D+Admin+%3Cno-reply%40indiehjaerta.com%3E%0D%0A'
   37    89        INIT_FCALL                                               'mail'
         90        SEND_VAR                                                 !3
         91        SEND_VAL                                                 '%5Bindiehjaerta.com%5D+Password+Reset'
         92        SEND_VAR                                                 !7
         93        SEND_VAR                                                 !8
         94        DO_ICALL                                                 
   39    95        INIT_FCALL                                               'ip2long'
         96        FETCH_R                      global              ~55     '_SERVER'
         97        FETCH_DIM_R                                      ~56     ~55, 'REMOTE_ADDR'
         98        SEND_VAL                                                 ~56
         99        DO_ICALL                                         $57     
        100        ASSIGN                                                   !9, $57
   41   101        INIT_FCALL_BY_NAME                                       'mysqli_query'
        102        SEND_VAR_EX                                              !2
        103        ROPE_INIT                                     9  ~60     'INSERT+INTO+passwordrequest+%28%60ipaddress%60%2C+%60email%60%2C+%60timestamp%60%2C+%60token%60%29+VALUES+%28%27'
        104        ROPE_ADD                                      1  ~60     ~60, !9
        105        ROPE_ADD                                      2  ~60     ~60, '%27%2C+%27'
        106        ROPE_ADD                                      3  ~60     ~60, !3
        107        ROPE_ADD                                      4  ~60     ~60, '%27%2C+%27'
        108        ROPE_ADD                                      5  ~60     ~60, !4
        109        ROPE_ADD                                      6  ~60     ~60, '%27%2C+%27'
        110        ROPE_ADD                                      7  ~60     ~60, !5
        111        ROPE_END                                      8  ~59     ~60, '%27%29'
        112        SEND_VAL_EX                                              ~59
        113        DO_FCALL                                      0  $65     
        114        ASSIGN                                                   !10, $65
   44   115    >   ECHO                                                     '%0A%3Chtml%3E%0A%3Chead%3E%0A%0A%3Cmeta+http-equiv%3D%22Content-Type%22+content%3D%22text%2Fhtml%3Bcharset%3DUTF-8%22+%2F%3E%0A%0A%3Ctitle%3Eindiehjaerta.com+-+Request+Password%3C%2Ftitle%3E%0A%0A%3Clink+href%3D%22style_test.css%22+rel%3D%22stylesheet%22+type%3D%22text%2Fcss%22+%2F%3E%0A%0A%3C%2Fhead%3E%0A%3Cbody%3E%0A%0A%3Ca+href%3D%22login.php%22%3ELogin%3Ca%2F%3E+-+%0A%3Ca+href%3D%22admin.php%22%3EAdmin%3Ca%2F%3E+-+%0A%3Ca+href%3D%22members.php%22%3EMembers%3Ca%2F%3E+-+%0A%3Ca+href%3D%22register.php%22%3ERegister%3Ca%2F%3E+-+%0A%3Ca+href%3D%22blog.php%22%3EBlog%3Ca%2F%3E+-+%0A%3Ca+href%3D%22news.php%22%3ENews%3Ca%2F%3E+-+%0A%3Ca+href%3D%22event.php%22%3EEvent%3Ca%2F%3E+-+%0A%3Ca+href%3D%22forum.php%22%3EForum%3Ca%2F%3E%0A%3Cbr+%2F%3E+%3Cbr+%2F%3E%0A%0A'
   68   116        FETCH_IS                                         ~67     '_POST'
        117        ISSET_ISEMPTY_DIM_OBJ                         0          ~67, 'request'
        118      > JMPZ                                                     ~68, ->123
   71   119    >   ECHO                                                     '%3Ctable+width%3D%22300%22+border%3D%220%22+align%3D%22center%22+cellpadding%3D%220%22+cellspacing%3D%221%22+bgcolor%3D%22%23CCCCCC%22%3E%0A%09%3Ctr%3E%0A%09%09%3Ctd%3E%0A%09%09%09%3Ctable+width%3D%22100%25%22+border%3D%220%22+cellpadding%3D%223%22+cellspacing%3D%221%22+bgcolor%3D%22%23FFFFFF%22%3E%0A%09%09%09%09%3Ctr%3E%0A%09%09%09%09%09%3Ctd+colspan%3D%223%22%3E%3Cstrong%3EE-mail+sent+to+'
   76   120        ECHO                                                     !3
        121        ECHO                                                     '+with+details+on+how+to+change+password.%3C%2Fstrong%3E%3C%2Ftd%3E%0A%09%09%09%09%3C%2Ftr%3E%0A%09%09%09%3C%2Ftable%3E%0A%09%09%3C%2Ftd%3E%0A%09%3C%2Ftr%3E%0A%3C%2Ftable%3E%0A%0A'
        122      > JMP                                                      ->124
   88   123    >   ECHO                                                     '%0A%3Ctable+width%3D%22300%22+border%3D%220%22+align%3D%22center%22+cellpadding%3D%220%22+cellspacing%3D%221%22+bgcolor%3D%22%23CCCCCC%22%3E%0A%09%3Ctr%3E%0A%09%09%3Cform+method%3D%22post%22+action%3D%22%22%3E%0A%09%09%09%3Ctd%3E%0A%09%09%09%09%3Ctable+width%3D%22100%25%22+border%3D%220%22+cellpadding%3D%223%22+cellspacing%3D%221%22+bgcolor%3D%22%23FFFFFF%22%3E%0A%09%09%09%09%09%3Ctr%3E%0A%09%09%09%09%09%09%3Ctd+colspan%3D%223%22%3E%3Cstrong%3EPassword+request.%3C%2Fstrong%3E%3C%2Ftd%3E%0A%09%09%09%09%09%3C%2Ftr%3E%0A%09%09%09%09%09%3Ctr%3E%0A%09%09%09%09%09%09%3Ctd+width%3D%2278%22%3E%3Cstrong%3EE-mail%3C%2Fstrong%3E%3C%2Ftd%3E%09%0A%09%09%09%09%09%09%3Ctd+width%3D%226%22%3E%3A%3C%2Ftd%3E%0A%09%09%09%09%09%09%3Ctd+width%3D%22294%22%3E%3Cinput+name%3D%22email%22+type%3D%22text%22+id%3D%22email%22%3E%3C%2Ftd%3E%0A%09%09%09%09%09%3C%2Ftr%3E%0A%09%09%09%09%09%3Ctr%3E%0A%09%09%09%09%09%09%3Ctd%3E%26nbsp%3B%3C%2Ftd%3E%0A%09%09%09%09%09%09%3Ctd%3E%26nbsp%3B%3C%2Ftd%3E%0A%09%09%09%09%09%09%3Ctd%3E%3Cinput+type%3D%22submit%22+name%3D%22request%22+value%3D%22Request%22%3E%3C%2Ftd%3E%0A%09%09%09%09%09%3C%2Ftr%3E%0A%09%09%09%09%3C%2Ftable%3E%0A%09%09%09%3C%2Ftd%3E%0A%09%09%3C%2Fform%3E%0A%09%3C%2Ftr%3E%0A%3C%2Ftable%3E%0A%0A'
  115   124    >   INIT_FCALL                                               'microtime'
        125        DO_ICALL                                         $69     
        126        ASSIGN                                                   !0, $69
  116   127        INIT_FCALL                                               'explode'
        128        SEND_VAL                                                 '+'
        129        SEND_VAR                                                 !0
        130        DO_ICALL                                         $71     
        131        ASSIGN                                                   !0, $71
  117   132        FETCH_DIM_R                                      ~73     !0, 1
        133        FETCH_DIM_R                                      ~74     !0, 0
        134        ADD                                              ~75     ~73, ~74
        135        ASSIGN                                                   !0, ~75
  118   136        ASSIGN                                                   !11, !0
  119   137        INIT_FCALL                                               'round'
        138        SUB                                              ~78     !11, !1
        139        SEND_VAL                                                 ~78
        140        SEND_VAL                                                 4
        141        DO_ICALL                                         $79     
        142        ASSIGN                                                   !12, $79
  120   143        CONCAT                                           ~81     '%3Cspan+class%3D%22text%22%3EPage+generated+in+', !12
        144        CONCAT                                           ~82     ~81, '+seconds.%3C%2Fspan%3E%3Cbr+%2F%3E'
        145        ECHO                                                     ~82
  122   146        ECHO                                                     '%0A%3C%2Fbody%3E%0A%3C%2Fhtml%3E'
  124   147      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.73 ms | 1412 KiB | 35 Q