3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<!DOCTYPE html> <html> <head> <title>New App</title> <style type="text/css"> option { text-transform:capitalize; } th { text-transform:uppercase; font-family:Helvetica; font-size:18px; color:midnightblue; } </style> </head> <body> <table border="0"> <form name="user_select_mode" method="post" action=""> <tr> <td>Order By</td> <td> <select name="sort_by"> <option value ="domain">domain</option> <option value ="tld<">tld</option> <option value ="registrar_userid">registrar_userid</option> <option value ="company">company</option> <option value ="status">status</option> <option value ="creationdate">creationdate</option> <option value ="actiondate">actiondate</option> <option value ="timestamp">timestamp</option> </select> </td> <td> <input type="submit" name="select_option" value="Go"/> </td> </tr> </form> </table> <table border="1"> <tr> <th>domain</th> <th>tld</th> <th>type</th> <th>registrar_userid</th> <th>company</th> <th>status</th> <th>creationdate</th> <th>actiondate</th> <th>timestamp</th> </tr> <?php mysql_connect ("localhost", "abuse", "abuse@radix") or exit ("Connection Failed"); mysql_select_db ("abuse") or exit ("Cannot connect to the database"); //include ('database_connect.php'); $retreive_data=mysql_query("select * from ownabuse order by '".$_POST['sort_by']."'"); while ($data=mysql_fetch_array($retreive_data)) { echo "<tr>"; echo "<td>".$data['domain']."</td>"; echo "<td>".$data['tld']."</td>"; echo "<td>".$data['type']."</td>"; echo "<td>".$data['registrar_userid']."</td>"; echo "<td>".$data['company']."</td>"; echo "<td>".$data['status']."</td>"; echo "<td>".$data['creationdate']."</td>"; echo "<td>".$data['actiondate']."</td>"; echo "<td>".$data['timestamp']."</td>"; echo "</tr>"; } ?> </table> </body> </html>
Output for 7.0.0 - 7.2.0
<!DOCTYPE html> <html> <head> <title>New App</title> <style type="text/css"> option { text-transform:capitalize; } th { text-transform:uppercase; font-family:Helvetica; font-size:18px; color:midnightblue; } </style> </head> <body> <table border="0"> <form name="user_select_mode" method="post" action=""> <tr> <td>Order By</td> <td> <select name="sort_by"> <option value ="domain">domain</option> <option value ="tld<">tld</option> <option value ="registrar_userid">registrar_userid</option> <option value ="company">company</option> <option value ="status">status</option> <option value ="creationdate">creationdate</option> <option value ="actiondate">actiondate</option> <option value ="timestamp">timestamp</option> </select> </td> <td> <input type="submit" name="select_option" value="Go"/> </td> </tr> </form> </table> <table border="1"> <tr> <th>domain</th> <th>tld</th> <th>type</th> <th>registrar_userid</th> <th>company</th> <th>status</th> <th>creationdate</th> <th>actiondate</th> <th>timestamp</th> </tr> Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /in/rQc72:56 Stack trace: #0 {main} thrown in /in/rQc72 on line 56
Process exited with code 255.
Output for 5.3.18 - 5.6.28
<!DOCTYPE html> <html> <head> <title>New App</title> <style type="text/css"> option { text-transform:capitalize; } th { text-transform:uppercase; font-family:Helvetica; font-size:18px; color:midnightblue; } </style> </head> <body> <table border="0"> <form name="user_select_mode" method="post" action=""> <tr> <td>Order By</td> <td> <select name="sort_by"> <option value ="domain">domain</option> <option value ="tld<">tld</option> <option value ="registrar_userid">registrar_userid</option> <option value ="company">company</option> <option value ="status">status</option> <option value ="creationdate">creationdate</option> <option value ="actiondate">actiondate</option> <option value ="timestamp">timestamp</option> </select> </td> <td> <input type="submit" name="select_option" value="Go"/> </td> </tr> </form> </table> <table border="1"> <tr> <th>domain</th> <th>tld</th> <th>type</th> <th>registrar_userid</th> <th>company</th> <th>status</th> <th>creationdate</th> <th>actiondate</th> <th>timestamp</th> </tr> Fatal error: Call to undefined function mysql_connect() in /in/rQc72 on line 56
Process exited with code 255.