3v4l.org

run code in 300+ PHP versions simultaneously
<html> <head> <title>Profil - Freundesystem</title> <link rel='stylesheet' href='style.css' /> </head> <body> <?php include 'connect.php'; ?> <?php include 'functions.php'; ?> <?php include 'header.php'; ?> <div class='container'> <?php if(isset($_GET['user']) && !empty($_GET['user'])){ $user = $_GET['user']; } else { $user = $_SESSION['user_id']; } $my_id = $_SESSION['user_id']; $username = getuser($user, 'username'); ?> <h3><?php echo $username; ?></h3> <?php if($user != $my_id){ $check_friend_query = mysql_query("SELECT id FROM friends WHERE (user_one='$my_id' AND user_two='$user') OR (user_one='$user' AND user_two='$my_id')"); if(mysql_num_rows($check_friend_query) == 1){ echo "<a href='#' class='box'>Already Friends</a> | <a href='#' class='box'>Unfriend $username</a>"; } else { $myfrom_query = mysql_query("SELECT `id` FROM `friend_req` WHERE `myfrom`='$user' AND `myto`='$my_id'"); $myto_query = mysql_query("SELECT `id` FROM `friend_req` WHERE `myfrom`='$my_id' AND `myto`='$user'"); if(mysql_num_rows($myfrom_query) == 1){ echo "<a href='#' class='box'>Ignore</a> | <a href='' class='box'>Accept</a>"; } else if (mysql_num_rows($myto_query) == 1){ echo "<a href='#' class='box'>Cancel Request</a>"; } else { echo "<a href='#' class='box'>Send Friend Request</a>"; } } } ?> </div> </body> </html>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 10, Position 2 = 14
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 19
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
2 jumps found. (Code = 43) Position 1 = 35, Position 2 = 91
Branch analysis from position: 35
2 jumps found. (Code = 43) Position 1 = 53, Position 2 = 58
Branch analysis from position: 53
1 jumps found. (Code = 42) Position 1 = 91
Branch analysis from position: 91
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 58
2 jumps found. (Code = 43) Position 1 = 81, Position 2 = 83
Branch analysis from position: 81
1 jumps found. (Code = 42) Position 1 = 91
Branch analysis from position: 91
Branch analysis from position: 83
2 jumps found. (Code = 43) Position 1 = 88, Position 2 = 90
Branch analysis from position: 88
1 jumps found. (Code = 42) Position 1 = 91
Branch analysis from position: 91
Branch analysis from position: 90
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 91
Branch analysis from position: 19
2 jumps found. (Code = 43) Position 1 = 35, Position 2 = 91
Branch analysis from position: 35
Branch analysis from position: 91
Branch analysis from position: 14
filename:       /in/CuXMr
function name:  (null)
number of ops:  93
compiled vars:  !0 = $user, !1 = $my_id, !2 = $username, !3 = $check_friend_query, !4 = $myfrom_query, !5 = $myto_query
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    1     0  E >   ECHO                                                     '%3Chtml%3E%0A%3Chead%3E%0A%3Ctitle%3EProfil+-+Freundesystem%3C%2Ftitle%3E%0A%3Clink+rel%3D%27stylesheet%27+href%3D%27style.css%27+%2F%3E%0A%3C%2Fhead%3E%0A%3Cbody%3E%0A'
    7     1        INCLUDE_OR_EVAL                                          'connect.php', INCLUDE
    8     2        ECHO                                                     '%0A'
    9     3        INCLUDE_OR_EVAL                                          'functions.php', INCLUDE
   10     4        ECHO                                                     '%0A'
   11     5        INCLUDE_OR_EVAL                                          'header.php', INCLUDE
   12     6        ECHO                                                     '%0A%3Cdiv+class%3D%27container%27%3E%0A'
   15     7        FETCH_IS                                         ~9      '_GET'
          8        ISSET_ISEMPTY_DIM_OBJ                         0  ~10     ~9, 'user'
          9      > JMPZ_EX                                          ~10     ~10, ->14
         10    >   FETCH_IS                                         ~11     '_GET'
         11        ISSET_ISEMPTY_DIM_OBJ                         1  ~12     ~11, 'user'
         12        BOOL_NOT                                         ~13     ~12
         13        BOOL                                             ~10     ~13
         14    > > JMPZ                                                     ~10, ->19
   16    15    >   FETCH_R                      global              ~14     '_GET'
         16        FETCH_DIM_R                                      ~15     ~14, 'user'
         17        ASSIGN                                                   !0, ~15
         18      > JMP                                                      ->22
   18    19    >   FETCH_R                      global              ~17     '_SESSION'
         20        FETCH_DIM_R                                      ~18     ~17, 'user_id'
         21        ASSIGN                                                   !0, ~18
   20    22    >   FETCH_R                      global              ~20     '_SESSION'
         23        FETCH_DIM_R                                      ~21     ~20, 'user_id'
         24        ASSIGN                                                   !1, ~21
   21    25        INIT_FCALL_BY_NAME                                       'getuser'
         26        SEND_VAR_EX                                              !0
         27        SEND_VAL_EX                                              'username'
         28        DO_FCALL                                      0  $23     
         29        ASSIGN                                                   !2, $23
   23    30        ECHO                                                     '%3Ch3%3E'
         31        ECHO                                                     !2
         32        ECHO                                                     '%3C%2Fh3%3E%0A'
   25    33        IS_NOT_EQUAL                                             !0, !1
         34      > JMPZ                                                     ~25, ->91
   26    35    >   INIT_FCALL_BY_NAME                                       'mysql_query'
         36        ROPE_INIT                                     9  ~27     'SELECT+id+FROM+friends+WHERE+%28user_one%3D%27'
         37        ROPE_ADD                                      1  ~27     ~27, !1
         38        ROPE_ADD                                      2  ~27     ~27, '%27+AND+user_two%3D%27'
         39        ROPE_ADD                                      3  ~27     ~27, !0
         40        ROPE_ADD                                      4  ~27     ~27, '%27%29+OR+%28user_one%3D%27'
         41        ROPE_ADD                                      5  ~27     ~27, !0
         42        ROPE_ADD                                      6  ~27     ~27, '%27+AND+user_two%3D%27'
         43        ROPE_ADD                                      7  ~27     ~27, !1
         44        ROPE_END                                      8  ~26     ~27, '%27%29'
         45        SEND_VAL_EX                                              ~26
         46        DO_FCALL                                      0  $32     
         47        ASSIGN                                                   !3, $32
   27    48        INIT_FCALL_BY_NAME                                       'mysql_num_rows'
         49        SEND_VAR_EX                                              !3
         50        DO_FCALL                                      0  $34     
         51        IS_EQUAL                                                 $34, 1
         52      > JMPZ                                                     ~35, ->58
   28    53    >   ROPE_INIT                                     3  ~37     '%3Ca+href%3D%27%23%27+class%3D%27box%27%3EAlready+Friends%3C%2Fa%3E+%7C+%3Ca+href%3D%27%23%27+class%3D%27box%27%3EUnfriend+'
         54        ROPE_ADD                                      1  ~37     ~37, !2
         55        ROPE_END                                      2  ~36     ~37, '%3C%2Fa%3E'
         56        ECHO                                                     ~36
         57      > JMP                                                      ->91
   30    58    >   INIT_FCALL_BY_NAME                                       'mysql_query'
         59        ROPE_INIT                                     5  ~40     'SELECT+%60id%60+FROM+%60friend_req%60+WHERE+%60myfrom%60%3D%27'
         60        ROPE_ADD                                      1  ~40     ~40, !0
         61        ROPE_ADD                                      2  ~40     ~40, '%27+AND+%60myto%60%3D%27'
         62        ROPE_ADD                                      3  ~40     ~40, !1
         63        ROPE_END                                      4  ~39     ~40, '%27'
         64        SEND_VAL_EX                                              ~39
         65        DO_FCALL                                      0  $43     
         66        ASSIGN                                                   !4, $43
   31    67        INIT_FCALL_BY_NAME                                       'mysql_query'
         68        ROPE_INIT                                     5  ~46     'SELECT+%60id%60+FROM+%60friend_req%60+WHERE+%60myfrom%60%3D%27'
         69        ROPE_ADD                                      1  ~46     ~46, !1
         70        ROPE_ADD                                      2  ~46     ~46, '%27+AND+%60myto%60%3D%27'
         71        ROPE_ADD                                      3  ~46     ~46, !0
         72        ROPE_END                                      4  ~45     ~46, '%27'
         73        SEND_VAL_EX                                              ~45
         74        DO_FCALL                                      0  $49     
         75        ASSIGN                                                   !5, $49
   32    76        INIT_FCALL_BY_NAME                                       'mysql_num_rows'
         77        SEND_VAR_EX                                              !4
         78        DO_FCALL                                      0  $51     
         79        IS_EQUAL                                                 $51, 1
         80      > JMPZ                                                     ~52, ->83
   33    81    >   ECHO                                                     '%3Ca+href%3D%27%23%27+class%3D%27box%27%3EIgnore%3C%2Fa%3E++%7C++%3Ca+href%3D%27%27+class%3D%27box%27%3EAccept%3C%2Fa%3E'
         82      > JMP                                                      ->91
   34    83    >   INIT_FCALL_BY_NAME                                       'mysql_num_rows'
         84        SEND_VAR_EX                                              !5
         85        DO_FCALL                                      0  $53     
         86        IS_EQUAL                                                 $53, 1
         87      > JMPZ                                                     ~54, ->90
   35    88    >   ECHO                                                     '%3Ca+href%3D%27%23%27+class%3D%27box%27%3ECancel+Request%3C%2Fa%3E'
         89      > JMP                                                      ->91
   37    90    >   ECHO                                                     '%3Ca+href%3D%27%23%27+class%3D%27box%27%3ESend+Friend+Request%3C%2Fa%3E'
   42    91    >   ECHO                                                     '%3C%2Fdiv%3E%0A%3C%2Fbody%3E%0A%3C%2Fhtml%3E'
   44    92      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.13 ms | 1403 KiB | 13 Q