3v4l.org

run code in 300+ PHP versions simultaneously
<?php // internal include file $qfu = "SELECT * FROM my_friends WHERE (user_id = '$user_id' OR friend_id = '$user_id') AND status = '1'"; $fu = mysql_query($qfu) or die(mysql_error()); $rowfu = mysql_num_rows($fu); if ($rowfu == 0 ) { // the user has no friend echo "No friends!"; } else { while($rowf = mysql_fetch_array($fu)){ if($user_id==$rowf['user_id']){ $fid=$rowf['friend_id']; } else { $fid=$rowf['user_id']; } $querymsgs = "SELECT M.msg_id, M.uid_fk, M.message, M.created, M.privacy, U.fname, U.lname FROM messages M, tbluser U WHERE (U.id='$fid' or U.id='$user_id') and (M.uid_fk='$fid' or M.uid_fk='$fid') and (M.privacy='1' or M.privacy='2') order by M.msg_id desc LIMIT $_i, $limit "; $qmsgs = mysql_query($querymsgs) or die(mysql_error()); $row_msgs = mysql_num_rows($qmsgs); if($row_msgs==0){ continue; } else { $msgs = mysql_fetch_array($qmsgs); $msg_id=$msgs['msg_id']; $orimessage=$msgs['message']; $message=tolink(htmlentities($msgs['message'])); $time=$msgs['created']; $privacy=$msgs['privacy']; if($privacy=='0'){ $privacy='Only Me';} elseif($privacy=='2'){ $privacy='Public';} else { $privacy='Friends';} $uid=$msgs['uid_fk']; $fullname=$msgs['fname']." ".$msgs['lname']; $face=$Wall->Avatar($uid); $commentsarray=$Wall->Comments($msg_id); } ?> <script type="text/javascript"> $(document).ready(function(){$("#stexpand<?php echo $msg_id;?>").oembed("<?php echo $orimessage; ?>",{maxWidth: 400, maxHeight: 300});}); </script> <div class="stbody" id="stbody<?php echo $msg_id;?>"> <div class="stimg"> <img src="<?php echo $face;?>" class='big_face'/> </div> <div class="sttext"> <a class="stdelete" href="#" id="<?php echo $msg_id;?>" title="Delete update">X</a> <b><a href="<?php echo 'http://nitofa.com/browse-user.php?fid='.$uid;?>"><?php echo $fullname;?></a></b> <br/><?php echo $message;?> <div class="sttime"><?php time_stamp($time);?> | <a href='#commentbox<?php echo $msg_id;?>' class='commentopen' id='<?php echo $msg_id;?>' title='Comment'>Comment </a> |<!-- <a href="share.php?msg_id=<?php echo $msg_id;?>">Share</a> |--> <?php include('likeunlike.php'); ?> | <?php echo $privacy;?></div> <div id="stexpandbox"> <div id="stexpand<?php echo $msg_id;?>"></div> </div> <div class="commentcontainer" id="commentload<?php echo $msg_id;?>"> <?php include('load_comments.php'); ?> </div> <div class="commentupdate" style='display:none;' id='commentbox<?php echo $msg_id;?>'> <div class="stcommentimg"> <img src="<?php echo $face;?>" class='small_face'/> </div> <div class="stcommenttext" > <form method="post" action="comment_ajax.php"> <textarea name="comment" class="comment" maxlength="200" id="ctextarea<?php echo $msg_id;?>"></textarea> <br /> <input type="submit" value=" Comment " id="<?php echo $msg_id;?>" class="comment_button"/> </form> </div> </div> </div> </div> <?php } } if(!$_GET['next']){ $page = '2'; } else { $page = $_GET['next']+1; } ?> <a style="text-align:center;margin:0 auto;" href="wall.php?next=<?=$page?>">View More</a>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 11, Position 2 = 15
Branch analysis from position: 11
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 15
2 jumps found. (Code = 43) Position 1 = 21, Position 2 = 23
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 158
Branch analysis from position: 158
2 jumps found. (Code = 43) Position 1 = 162, Position 2 = 164
Branch analysis from position: 162
1 jumps found. (Code = 42) Position 1 = 168
Branch analysis from position: 168
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 164
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
1 jumps found. (Code = 42) Position 1 = 153
Branch analysis from position: 153
2 jumps found. (Code = 44) Position 1 = 158, Position 2 = 24
Branch analysis from position: 158
Branch analysis from position: 24
2 jumps found. (Code = 43) Position 1 = 27, Position 2 = 30
Branch analysis from position: 27
1 jumps found. (Code = 42) Position 1 = 32
Branch analysis from position: 32
2 jumps found. (Code = 47) Position 1 = 51, Position 2 = 55
Branch analysis from position: 51
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 55
2 jumps found. (Code = 43) Position 1 = 61, Position 2 = 63
Branch analysis from position: 61
1 jumps found. (Code = 42) Position 1 = 153
Branch analysis from position: 153
Branch analysis from position: 63
2 jumps found. (Code = 43) Position 1 = 85, Position 2 = 87
Branch analysis from position: 85
1 jumps found. (Code = 42) Position 1 = 92
Branch analysis from position: 92
2 jumps found. (Code = 44) Position 1 = 158, Position 2 = 24
Branch analysis from position: 158
Branch analysis from position: 24
Branch analysis from position: 87
2 jumps found. (Code = 43) Position 1 = 89, Position 2 = 91
Branch analysis from position: 89
1 jumps found. (Code = 42) Position 1 = 92
Branch analysis from position: 92
Branch analysis from position: 91
2 jumps found. (Code = 44) Position 1 = 158, Position 2 = 24
Branch analysis from position: 158
Branch analysis from position: 24
Branch analysis from position: 30
2 jumps found. (Code = 47) Position 1 = 51, Position 2 = 55
Branch analysis from position: 51
Branch analysis from position: 55
filename:       /in/2lYoR
function name:  (null)
number of ops:  172
compiled vars:  !0 = $qfu, !1 = $user_id, !2 = $fu, !3 = $rowfu, !4 = $rowf, !5 = $fid, !6 = $querymsgs, !7 = $_i, !8 = $limit, !9 = $qmsgs, !10 = $row_msgs, !11 = $msgs, !12 = $msg_id, !13 = $orimessage, !14 = $message, !15 = $time, !16 = $privacy, !17 = $uid, !18 = $fullname, !19 = $face, !20 = $Wall, !21 = $commentsarray, !22 = $page
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ROPE_INIT                                     5  ~24     'SELECT+%2A+FROM+my_friends+WHERE+%28user_id+%3D+%27'
          1        ROPE_ADD                                      1  ~24     ~24, !1
          2        ROPE_ADD                                      2  ~24     ~24, '%27+OR+friend_id+%3D+%27'
          3        ROPE_ADD                                      3  ~24     ~24, !1
          4        ROPE_END                                      4  ~23     ~24, '%27%29+AND+status+%3D+%271%27'
          5        ASSIGN                                                   !0, ~23
    6     6        INIT_FCALL_BY_NAME                                       'mysql_query'
          7        SEND_VAR_EX                                              !0
          8        DO_FCALL                                      0  $28     
          9        ASSIGN                                           ~29     !2, $28
         10      > JMPNZ_EX                                         ~29     ~29, ->15
         11    >   INIT_FCALL_BY_NAME                                       'mysql_error'
         12        DO_FCALL                                      0  $30     
         13      > EXIT                                                     $30
         14*       BOOL                                             ~29     <true>
    8    15    >   INIT_FCALL_BY_NAME                                       'mysql_num_rows'
         16        SEND_VAR_EX                                              !2
         17        DO_FCALL                                      0  $31     
         18        ASSIGN                                                   !3, $31
   10    19        IS_EQUAL                                                 !3, 0
         20      > JMPZ                                                     ~33, ->23
   11    21    >   ECHO                                                     'No+friends%21'
         22      > JMP                                                      ->158
   13    23    > > JMP                                                      ->153
   14    24    >   FETCH_DIM_R                                      ~34     !4, 'user_id'
         25        IS_EQUAL                                                 !1, ~34
         26      > JMPZ                                                     ~35, ->30
         27    >   FETCH_DIM_R                                      ~36     !4, 'friend_id'
         28        ASSIGN                                                   !5, ~36
         29      > JMP                                                      ->32
         30    >   FETCH_DIM_R                                      ~38     !4, 'user_id'
         31        ASSIGN                                                   !5, ~38
   15    32    >   ROPE_INIT                                    13  ~41     'SELECT+M.msg_id%2C+M.uid_fk%2C+M.message%2C+M.created%2C+M.privacy%2C+U.fname%2C+U.lname+FROM+messages+M%2C+%0A%0Atbluser+U+WHERE+%28U.id%3D%27'
   17    33        ROPE_ADD                                      1  ~41     ~41, !5
         34        ROPE_ADD                                      2  ~41     ~41, '%27+or+U.id%3D%27'
         35        ROPE_ADD                                      3  ~41     ~41, !1
         36        ROPE_ADD                                      4  ~41     ~41, '%27%29+and+%28M.uid_fk%3D%27'
         37        ROPE_ADD                                      5  ~41     ~41, !5
         38        ROPE_ADD                                      6  ~41     ~41, '%27+or+M.uid_fk%3D%27'
         39        ROPE_ADD                                      7  ~41     ~41, !5
         40        ROPE_ADD                                      8  ~41     ~41, '%27%29+and+%28M.privacy%3D%271%27+or+M.privacy%3D%272%27%29+%0A%0Aorder+by+M.msg_id+desc+LIMIT+'
   19    41        ROPE_ADD                                      9  ~41     ~41, !7
         42        ROPE_ADD                                     10  ~41     ~41, '%2C+'
         43        ROPE_ADD                                     11  ~41     ~41, !8
         44        ROPE_END                                     12  ~40     ~41, '+'
   15    45        ASSIGN                                                   !6, ~40
   20    46        INIT_FCALL_BY_NAME                                       'mysql_query'
         47        SEND_VAR_EX                                              !6
         48        DO_FCALL                                      0  $49     
         49        ASSIGN                                           ~50     !9, $49
         50      > JMPNZ_EX                                         ~50     ~50, ->55
         51    >   INIT_FCALL_BY_NAME                                       'mysql_error'
         52        DO_FCALL                                      0  $51     
         53      > EXIT                                                     $51
         54*       BOOL                                             ~50     <true>
   21    55    >   INIT_FCALL_BY_NAME                                       'mysql_num_rows'
         56        SEND_VAR_EX                                              !9
         57        DO_FCALL                                      0  $52     
         58        ASSIGN                                                   !10, $52
   22    59        IS_EQUAL                                                 !10, 0
         60      > JMPZ                                                     ~54, ->63
   23    61    > > JMP                                                      ->153
         62*       JMP                                                      ->107
   25    63    >   INIT_FCALL_BY_NAME                                       'mysql_fetch_array'
         64        SEND_VAR_EX                                              !9
         65        DO_FCALL                                      0  $55     
         66        ASSIGN                                                   !11, $55
   26    67        FETCH_DIM_R                                      ~57     !11, 'msg_id'
         68        ASSIGN                                                   !12, ~57
   27    69        FETCH_DIM_R                                      ~59     !11, 'message'
         70        ASSIGN                                                   !13, ~59
   28    71        INIT_FCALL_BY_NAME                                       'tolink'
         72        INIT_FCALL                                               'htmlentities'
         73        FETCH_DIM_R                                      ~61     !11, 'message'
         74        SEND_VAL                                                 ~61
         75        DO_ICALL                                         $62     
         76        SEND_VAR_NO_REF_EX                                       $62
         77        DO_FCALL                                      0  $63     
         78        ASSIGN                                                   !14, $63
   29    79        FETCH_DIM_R                                      ~65     !11, 'created'
         80        ASSIGN                                                   !15, ~65
   30    81        FETCH_DIM_R                                      ~67     !11, 'privacy'
         82        ASSIGN                                                   !16, ~67
   31    83        IS_EQUAL                                                 !16, '0'
         84      > JMPZ                                                     ~69, ->87
         85    >   ASSIGN                                                   !16, 'Only+Me'
         86      > JMP                                                      ->92
         87    >   IS_EQUAL                                                 !16, '2'
         88      > JMPZ                                                     ~71, ->91
         89    >   ASSIGN                                                   !16, 'Public'
         90      > JMP                                                      ->92
   33    91    >   ASSIGN                                                   !16, 'Friends'
   34    92    >   FETCH_DIM_R                                      ~74     !11, 'uid_fk'
         93        ASSIGN                                                   !17, ~74
   35    94        FETCH_DIM_R                                      ~76     !11, 'fname'
         95        CONCAT                                           ~77     ~76, '+'
         96        FETCH_DIM_R                                      ~78     !11, 'lname'
         97        CONCAT                                           ~79     ~77, ~78
         98        ASSIGN                                                   !18, ~79
   36    99        INIT_METHOD_CALL                                         !20, 'Avatar'
        100        SEND_VAR_EX                                              !17
        101        DO_FCALL                                      0  $81     
        102        ASSIGN                                                   !19, $81
   37   103        INIT_METHOD_CALL                                         !20, 'Comments'
        104        SEND_VAR_EX                                              !12
        105        DO_FCALL                                      0  $83     
        106        ASSIGN                                                   !21, $83
   40   107        ECHO                                                     '%0A%3Cscript+type%3D%22text%2Fjavascript%22%3E+%0A%24%28document%29.ready%28function%28%29%7B%24%28%22%23stexpand'
   42   108        ECHO                                                     !12
        109        ECHO                                                     '%22%29.oembed%28%22'
        110        ECHO                                                     !13
        111        ECHO                                                     '%22%2C%7BmaxWidth%3A+400%2C+%0A%0AmaxHeight%3A+300%7D%29%3B%7D%29%3B%0A%3C%2Fscript%3E%0A%3Cdiv+class%3D%22stbody%22+id%3D%22stbody'
   46   112        ECHO                                                     !12
        113        ECHO                                                     '%22%3E%0A%0A%3Cdiv+class%3D%22stimg%22%3E%0A%3Cimg+src%3D%22'
   49   114        ECHO                                                     !19
        115        ECHO                                                     '%22+class%3D%27big_face%27%2F%3E%0A%3C%2Fdiv%3E+%0A%3Cdiv+class%3D%22sttext%22%3E%0A%3Ca+class%3D%22stdelete%22+href%3D%22%23%22+id%3D%22'
   52   116        ECHO                                                     !12
        117        ECHO                                                     '%22+title%3D%22Delete+update%22%3EX%3C%2Fa%3E%0A%3Cb%3E%3Ca+href%3D%22'
   53   118        CONCAT                                           ~85     'http%3A%2F%2Fnitofa.com%2Fbrowse-user.php%3Ffid%3D', !17
        119        ECHO                                                     ~85
        120        ECHO                                                     '%22%3E'
        121        ECHO                                                     !18
        122        ECHO                                                     '%3C%2Fa%3E%3C%2Fb%3E+%3Cbr%2F%3E'
   55   123        ECHO                                                     !14
   56   124        ECHO                                                     '%3Cdiv+class%3D%22sttime%22%3E'
        125        INIT_FCALL_BY_NAME                                       'time_stamp'
        126        SEND_VAR_EX                                              !15
        127        DO_FCALL                                      0          
        128        ECHO                                                     '+%7C+%3Ca+href%3D%27%23commentbox'
        129        ECHO                                                     !12
        130        ECHO                                                     '%27+class%3D%27commentopen%27+id%3D%27'
   58   131        ECHO                                                     !12
        132        ECHO                                                     '%27+title%3D%27Comment%27%3EComment+%3C%2Fa%3E+%7C%3C%21--+%3Ca+href%3D%22share.php%3Fmsg_id%3D'
        133        ECHO                                                     !12
        134        ECHO                                                     '%22%3EShare%3C%2Fa%3E+%7C--%3E+'
   60   135        INCLUDE_OR_EVAL                                          'likeunlike.php', INCLUDE
        136        ECHO                                                     '+%7C+'
        137        ECHO                                                     !16
        138        ECHO                                                     '%3C%2Fdiv%3E+%0A%0A%3Cdiv+id%3D%22stexpandbox%22%3E%0A%3Cdiv+id%3D%22stexpand'
   63   139        ECHO                                                     !12
        140        ECHO                                                     '%22%3E%3C%2Fdiv%3E%0A%3C%2Fdiv%3E%0A%0A%3Cdiv+class%3D%22commentcontainer%22+id%3D%22commentload'
   66   141        ECHO                                                     !12
        142        ECHO                                                     '%22%3E%0A%0A'
   68   143        INCLUDE_OR_EVAL                                          'load_comments.php', INCLUDE
   69   144        ECHO                                                     '%0A%3C%2Fdiv%3E%0A%3Cdiv+class%3D%22commentupdate%22+style%3D%27display%3Anone%3B%27+id%3D%27commentbox'
   71   145        ECHO                                                     !12
        146        ECHO                                                     '%27%3E%0A%3Cdiv+class%3D%22stcommentimg%22%3E%0A%3Cimg+src%3D%22'
   73   147        ECHO                                                     !19
        148        ECHO                                                     '%22+class%3D%27small_face%27%2F%3E%0A%3C%2Fdiv%3E+%0A%3Cdiv+class%3D%22stcommenttext%22+%3E%0A%3Cform+method%3D%22post%22+action%3D%22comment_ajax.php%22%3E%0A%0A%3Ctextarea+name%3D%22comment%22+class%3D%22comment%22+maxlength%3D%22200%22++id%3D%22ctextarea'
   78   149        ECHO                                                     !12
        150        ECHO                                                     '%22%3E%3C%2Ftextarea%3E%0A%3Cbr+%2F%3E%0A%3Cinput+type%3D%22submit%22++value%3D%22+Comment+%22++id%3D%22'
   80   151        ECHO                                                     !12
        152        ECHO                                                     '%22+class%3D%22comment_button%22%2F%3E%0A%3C%2Fform%3E%0A%0A%0A%3C%2Fdiv%3E%0A%3C%2Fdiv%3E%0A%0A%0A%3C%2Fdiv%3E+%0A%0A%3C%2Fdiv%3E%0A'
   13   153    >   INIT_FCALL_BY_NAME                                       'mysql_fetch_array'
        154        SEND_VAR_EX                                              !2
        155        DO_FCALL                                      0  $89     
        156        ASSIGN                                           ~90     !4, $89
        157      > JMPNZ                                                    ~90, ->24
   96   158    >   FETCH_R                      global              ~91     '_GET'
        159        FETCH_DIM_R                                      ~92     ~91, 'next'
        160        BOOL_NOT                                         ~93     ~92
        161      > JMPZ                                                     ~93, ->164
        162    >   ASSIGN                                                   !22, '2'
        163      > JMP                                                      ->168
        164    >   FETCH_R                      global              ~95     '_GET'
        165        FETCH_DIM_R                                      ~96     ~95, 'next'
        166        ADD                                              ~97     ~96, 1
        167        ASSIGN                                                   !22, ~97
   98   168    >   ECHO                                                     '%3Ca+style%3D%22text-align%3Acenter%3Bmargin%3A0+auto%3B%22+href%3D%22wall.php%3Fnext%3D'
        169        ECHO                                                     !22
        170        ECHO                                                     '%22%3EView+More%3C%2Fa%3E'
        171      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.58 ms | 1412 KiB | 15 Q