3v4l.org

run code in 300+ PHP versions simultaneously
<?php ini_set('display_errors', 'On'); error_reporting(E_ALL); $time = microtime(); $time = explode(' ', $time); $time = $time[1] + $time[0]; $start = $time; define("DB_HOST","mysql117.loopia.se"); define("DB_USER","normal@i103189"); define("DB_PASS","KungMicke87"); define("DB_NAME","indiehjaerta_com"); ?> <html> <head> <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" /> <title>indiehjaerta.com - News</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/> - <a href="profile.php">Profile<a/> - <a href="logout.php">Logout<a/> <br /> <br /> <!-- New Post Start --> <?php // 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(); } $query = mysqli_query($sqli, "SELECT * FROM news ORDER BY id") or die("Error: ".mysqli_error($sqli)); echo '<table border="0">'; while ($row = mysqli_fetch_array($query)) { echo '<tr>'; echo '<td><span class="text">Subject:</span></td>'; echo '<td><span class="text">' .$row['headline']. '</span></td>'; echo '</tr>'; echo '<tr>'; echo '<td colspan="2"><span class="text">Story:</span></td>'; echo '</tr>'; echo '<tr>'; echo '<td colspan="2"><span class="text">' .$row['story']. '</span></td>'; echo '</tr>'; echo '<tr>'; echo '<td><span class="text">Written by:</span></td>'; echo '<td><span class="text">' .$row['userid']. '</span></td>'; echo '</tr>'; echo '<tr>'; echo '<td><span class="text">Time:</span></td>'; echo '<td><span class="text">' .$row['timestamp']. '</span></td>'; echo '</tr>'; } echo "</table><br />"; ?> <!-- New Post End --> <?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 = 47) Position 1 = 49, Position 2 = 55
Branch analysis from position: 49
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 55
2 jumps found. (Code = 43) Position 1 = 58, Position 2 = 62
Branch analysis from position: 58
2 jumps found. (Code = 47) Position 1 = 68, Position 2 = 74
Branch analysis from position: 68
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 74
1 jumps found. (Code = 42) Position 1 = 106
Branch analysis from position: 106
2 jumps found. (Code = 44) Position 1 = 111, Position 2 = 76
Branch analysis from position: 111
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 76
2 jumps found. (Code = 44) Position 1 = 111, Position 2 = 76
Branch analysis from position: 111
Branch analysis from position: 76
Branch analysis from position: 62
filename:       /in/cnPl8
function name:  (null)
number of ops:  137
compiled vars:  !0 = $time, !1 = $start, !2 = $sqli, !3 = $query, !4 = $row, !5 = $finish, !6 = $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                                                 'On'
          3        DO_ICALL                                                 
    3     4        INIT_FCALL                                               'error_reporting'
          5        SEND_VAL                                                 32767
          6        DO_ICALL                                                 
    5     7        INIT_FCALL                                               'microtime'
          8        DO_ICALL                                         $9      
          9        ASSIGN                                                   !0, $9
    6    10        INIT_FCALL                                               'explode'
         11        SEND_VAL                                                 '+'
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                         $11     
         14        ASSIGN                                                   !0, $11
    7    15        FETCH_DIM_R                                      ~13     !0, 1
         16        FETCH_DIM_R                                      ~14     !0, 0
         17        ADD                                              ~15     ~13, ~14
         18        ASSIGN                                                   !0, ~15
    8    19        ASSIGN                                                   !1, !0
   10    20        INIT_FCALL                                               'define'
         21        SEND_VAL                                                 'DB_HOST'
         22        SEND_VAL                                                 'mysql117.loopia.se'
         23        DO_ICALL                                                 
   11    24        INIT_FCALL                                               'define'
         25        SEND_VAL                                                 'DB_USER'
         26        SEND_VAL                                                 'normal%40i103189'
         27        DO_ICALL                                                 
   12    28        INIT_FCALL                                               'define'
         29        SEND_VAL                                                 'DB_PASS'
         30        SEND_VAL                                                 'KungMicke87'
         31        DO_ICALL                                                 
   13    32        INIT_FCALL                                               'define'
         33        SEND_VAL                                                 'DB_NAME'
         34        SEND_VAL                                                 'indiehjaerta_com'
         35        DO_ICALL                                                 
   15    36        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+-+News%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%3Ca+href%3D%22profile.php%22%3EProfile%3Ca%2F%3E+-+%0A%3Ca+href%3D%22logout.php%22%3ELogout%3Ca%2F%3E%0A%3Cbr+%2F%3E+%3Cbr+%2F%3E%0A%0A%3C%21--+New+Post+Start+--%3E%0A%0A'
   45    37        INIT_FCALL_BY_NAME                                       'mysqli_connect'
         38        FETCH_CONSTANT                                   ~22     'DB_HOST'
         39        SEND_VAL_EX                                              ~22
         40        FETCH_CONSTANT                                   ~23     'DB_USER'
         41        SEND_VAL_EX                                              ~23
         42        FETCH_CONSTANT                                   ~24     'DB_PASS'
         43        SEND_VAL_EX                                              ~24
         44        FETCH_CONSTANT                                   ~25     'DB_NAME'
         45        SEND_VAL_EX                                              ~25
         46        DO_FCALL                                      0  $26     
         47        ASSIGN                                           ~27     !2, $26
         48      > JMPNZ_EX                                         ~27     ~27, ->55
         49    >   INIT_FCALL_BY_NAME                                       'mysqli_error'
         50        SEND_VAR_EX                                              !2
         51        DO_FCALL                                      0  $28     
         52        CONCAT                                           ~29     'Error%3A+', $28
         53      > EXIT                                                     ~29
         54*       BOOL                                             ~27     <true>
   48    55    >   INIT_FCALL_BY_NAME                                       'mysqli_connect_errno'
         56        DO_FCALL                                      0  $30     
         57      > JMPZ                                                     $30, ->62
   50    58    >   INIT_FCALL_BY_NAME                                       'mysqli_connect_error'
         59        DO_FCALL                                      0  $31     
         60        CONCAT                                           ~32     'Failed+to+connect+to+MySQL%3A+', $31
         61        ECHO                                                     ~32
   53    62    >   INIT_FCALL_BY_NAME                                       'mysqli_query'
         63        SEND_VAR_EX                                              !2
         64        SEND_VAL_EX                                              'SELECT+%2A+FROM+news+ORDER+BY+id'
         65        DO_FCALL                                      0  $33     
         66        ASSIGN                                           ~34     !3, $33
         67      > JMPNZ_EX                                         ~34     ~34, ->74
         68    >   INIT_FCALL_BY_NAME                                       'mysqli_error'
         69        SEND_VAR_EX                                              !2
         70        DO_FCALL                                      0  $35     
         71        CONCAT                                           ~36     'Error%3A+', $35
         72      > EXIT                                                     ~36
         73*       BOOL                                             ~34     <true>
   55    74    >   ECHO                                                     '%3Ctable+border%3D%220%22%3E'
   57    75      > JMP                                                      ->106
   60    76    >   ECHO                                                     '%3Ctr%3E'
   61    77        ECHO                                                     '%3Ctd%3E%3Cspan+class%3D%22text%22%3ESubject%3A%3C%2Fspan%3E%3C%2Ftd%3E'
   62    78        FETCH_DIM_R                                      ~37     !4, 'headline'
         79        CONCAT                                           ~38     '%3Ctd%3E%3Cspan+class%3D%22text%22%3E', ~37
         80        CONCAT                                           ~39     ~38, '%3C%2Fspan%3E%3C%2Ftd%3E'
         81        ECHO                                                     ~39
   63    82        ECHO                                                     '%3C%2Ftr%3E'
   65    83        ECHO                                                     '%3Ctr%3E'
   66    84        ECHO                                                     '%3Ctd+colspan%3D%222%22%3E%3Cspan+class%3D%22text%22%3EStory%3A%3C%2Fspan%3E%3C%2Ftd%3E'
   67    85        ECHO                                                     '%3C%2Ftr%3E'
   69    86        ECHO                                                     '%3Ctr%3E'
   70    87        FETCH_DIM_R                                      ~40     !4, 'story'
         88        CONCAT                                           ~41     '%3Ctd+colspan%3D%222%22%3E%3Cspan+class%3D%22text%22%3E', ~40
         89        CONCAT                                           ~42     ~41, '%3C%2Fspan%3E%3C%2Ftd%3E'
         90        ECHO                                                     ~42
   71    91        ECHO                                                     '%3C%2Ftr%3E'
   73    92        ECHO                                                     '%3Ctr%3E'
   74    93        ECHO                                                     '%3Ctd%3E%3Cspan+class%3D%22text%22%3EWritten+by%3A%3C%2Fspan%3E%3C%2Ftd%3E'
   75    94        FETCH_DIM_R                                      ~43     !4, 'userid'
         95        CONCAT                                           ~44     '%3Ctd%3E%3Cspan+class%3D%22text%22%3E', ~43
         96        CONCAT                                           ~45     ~44, '%3C%2Fspan%3E%3C%2Ftd%3E'
         97        ECHO                                                     ~45
   76    98        ECHO                                                     '%3C%2Ftr%3E'
   78    99        ECHO                                                     '%3Ctr%3E'
   79   100        ECHO                                                     '%3Ctd%3E%3Cspan+class%3D%22text%22%3ETime%3A%3C%2Fspan%3E%3C%2Ftd%3E'
   80   101        FETCH_DIM_R                                      ~46     !4, 'timestamp'
        102        CONCAT                                           ~47     '%3Ctd%3E%3Cspan+class%3D%22text%22%3E', ~46
        103        CONCAT                                           ~48     ~47, '%3C%2Fspan%3E%3C%2Ftd%3E'
        104        ECHO                                                     ~48
   81   105        ECHO                                                     '%3C%2Ftr%3E'
   57   106    >   INIT_FCALL_BY_NAME                                       'mysqli_fetch_array'
        107        SEND_VAR_EX                                              !3
        108        DO_FCALL                                      0  $49     
        109        ASSIGN                                           ~50     !4, $49
        110      > JMPNZ                                                    ~50, ->76
   84   111    >   ECHO                                                     '%3C%2Ftable%3E%3Cbr+%2F%3E'
   88   112        ECHO                                                     '%0A%0A%3C%21--+New+Post+End+--%3E%0A%0A'
   93   113        INIT_FCALL                                               'microtime'
        114        DO_ICALL                                         $51     
        115        ASSIGN                                                   !0, $51
   94   116        INIT_FCALL                                               'explode'
        117        SEND_VAL                                                 '+'
        118        SEND_VAR                                                 !0
        119        DO_ICALL                                         $53     
        120        ASSIGN                                                   !0, $53
   95   121        FETCH_DIM_R                                      ~55     !0, 1
        122        FETCH_DIM_R                                      ~56     !0, 0
        123        ADD                                              ~57     ~55, ~56
        124        ASSIGN                                                   !0, ~57
   96   125        ASSIGN                                                   !5, !0
   97   126        INIT_FCALL                                               'round'
        127        SUB                                              ~60     !5, !1
        128        SEND_VAL                                                 ~60
        129        SEND_VAL                                                 4
        130        DO_ICALL                                         $61     
        131        ASSIGN                                                   !6, $61
   98   132        CONCAT                                           ~63     '%3Cspan+class%3D%22text%22%3EPage+generated+in+', !6
        133        CONCAT                                           ~64     ~63, '+seconds.%3C%2Fspan%3E%3Cbr+%2F%3E'
        134        ECHO                                                     ~64
  100   135        ECHO                                                     '%0A%3C%2Fbody%3E%0A%3C%2Fhtml%3E'
  102   136      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.71 ms | 1408 KiB | 25 Q