3v4l.org

run code in 300+ PHP versions simultaneously
<?php //internal file if($msg_id) { $qlikes = mysql_query("SELECT * FROM group_likes WHERE msg_id = '$msg_id'") or die("Error while fetching likes"); $qrow = mysql_fetch_array($qlikes); $likes = mysql_num_rows($qlikes); $likes2 = $likes-1; $qliked = mysql_query("SELECT * FROM group_likes WHERE msg_id = '$msg_id' AND liker = '$user_id'") or die("error while getting user likes data"); $liked = mysql_num_rows($qliked); if($liked==1) { echo "<a class='like' href='unlike.php?id=".$msg_id."'>Unlike</a> &nbsp; "; if($likes > '1') { echo "You and ".$likes2." others likes this."; } else { echo "You like this."; } } else { echo "<a class='like' href='like.php?id=".$msg_id."'>Like</a> &nbsp; "; if($likes > 1 ) { echo $likes." others likes this."; } } } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 1, Position 2 = 57
Branch analysis from position: 1
2 jumps found. (Code = 47) Position 1 = 9, Position 2 = 11
Branch analysis from position: 9
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 11
2 jumps found. (Code = 47) Position 1 = 31, Position 2 = 33
Branch analysis from position: 31
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 33
2 jumps found. (Code = 43) Position 1 = 39, Position 2 = 50
Branch analysis from position: 39
2 jumps found. (Code = 43) Position 1 = 44, Position 2 = 48
Branch analysis from position: 44
1 jumps found. (Code = 42) Position 1 = 49
Branch analysis from position: 49
1 jumps found. (Code = 42) Position 1 = 57
Branch analysis from position: 57
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 48
1 jumps found. (Code = 42) Position 1 = 57
Branch analysis from position: 57
Branch analysis from position: 50
2 jumps found. (Code = 43) Position 1 = 55, Position 2 = 57
Branch analysis from position: 55
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 57
Branch analysis from position: 57
filename:       /in/3IoDS
function name:  (null)
number of ops:  58
compiled vars:  !0 = $msg_id, !1 = $qlikes, !2 = $qrow, !3 = $likes, !4 = $likes2, !5 = $qliked, !6 = $user_id, !7 = $liked
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E > > JMPZ                                                     !0, ->57
    6     1    >   INIT_FCALL_BY_NAME                                       'mysql_query'
          2        ROPE_INIT                                     3  ~9      'SELECT+%2A+FROM+group_likes+WHERE+msg_id+%3D+%27'
          3        ROPE_ADD                                      1  ~9      ~9, !0
          4        ROPE_END                                      2  ~8      ~9, '%27'
          5        SEND_VAL_EX                                              ~8
          6        DO_FCALL                                      0  $11     
          7        ASSIGN                                           ~12     !1, $11
          8      > JMPNZ_EX                                         ~12     ~12, ->11
          9    > > EXIT                                                     'Error+while+fetching+likes'
         10*       BOOL                                             ~12     <true>
    7    11    >   INIT_FCALL_BY_NAME                                       'mysql_fetch_array'
         12        SEND_VAR_EX                                              !1
         13        DO_FCALL                                      0  $13     
         14        ASSIGN                                                   !2, $13
    8    15        INIT_FCALL_BY_NAME                                       'mysql_num_rows'
         16        SEND_VAR_EX                                              !1
         17        DO_FCALL                                      0  $15     
         18        ASSIGN                                                   !3, $15
    9    19        SUB                                              ~17     !3, 1
         20        ASSIGN                                                   !4, ~17
   10    21        INIT_FCALL_BY_NAME                                       'mysql_query'
         22        ROPE_INIT                                     5  ~20     'SELECT+%2A+FROM+group_likes+WHERE+msg_id+%3D+%27'
         23        ROPE_ADD                                      1  ~20     ~20, !0
         24        ROPE_ADD                                      2  ~20     ~20, '%27+AND+liker+%3D+%27'
         25        ROPE_ADD                                      3  ~20     ~20, !6
         26        ROPE_END                                      4  ~19     ~20, '%27'
         27        SEND_VAL_EX                                              ~19
         28        DO_FCALL                                      0  $23     
         29        ASSIGN                                           ~24     !5, $23
         30      > JMPNZ_EX                                         ~24     ~24, ->33
         31    > > EXIT                                                     'error+while+getting+user+likes+data'
         32*       BOOL                                             ~24     <true>
   11    33    >   INIT_FCALL_BY_NAME                                       'mysql_num_rows'
         34        SEND_VAR_EX                                              !5
         35        DO_FCALL                                      0  $25     
         36        ASSIGN                                                   !7, $25
   12    37        IS_EQUAL                                                 !7, 1
         38      > JMPZ                                                     ~27, ->50
   13    39    >   CONCAT                                           ~28     '%3Ca+class%3D%27like%27+href%3D%27unlike.php%3Fid%3D', !0
         40        CONCAT                                           ~29     ~28, '%27%3EUnlike%3C%2Fa%3E+%26nbsp%3B+'
         41        ECHO                                                     ~29
   14    42        IS_SMALLER                                               '1', !3
         43      > JMPZ                                                     ~30, ->48
         44    >   CONCAT                                           ~31     'You+and+', !4
         45        CONCAT                                           ~32     ~31, '+others+likes+this.'
         46        ECHO                                                     ~32
         47      > JMP                                                      ->49
   15    48    >   ECHO                                                     'You+like+this.'
         49    > > JMP                                                      ->57
   18    50    >   CONCAT                                           ~33     '%3Ca+class%3D%27like%27+href%3D%27like.php%3Fid%3D', !0
         51        CONCAT                                           ~34     ~33, '%27%3ELike%3C%2Fa%3E+%26nbsp%3B+'
         52        ECHO                                                     ~34
   19    53        IS_SMALLER                                               1, !3
         54      > JMPZ                                                     ~35, ->57
   20    55    >   CONCAT                                           ~36     !3, '+others+likes+this.'
         56        ECHO                                                     ~36
   23    57    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150 ms | 1399 KiB | 13 Q