3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?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); $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 ".$likes-1." 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."; } } } ?>
Output for 5.4.0 - 5.4.17
Parse error: syntax error, unexpected '" others likes this."' (T_CONSTANT_ENCAPSED_STRING), expecting ',' or ';' in /in/E4BJV on line 14
Process exited with code 255.
Output for 5.3.0 - 5.3.26
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';' in /in/E4BJV on line 14
Process exited with code 255.