3v4l.org

run code in 300+ PHP versions simultaneously
<!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.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
<!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.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.40
<!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.

preferences:
294.13 ms | 407 KiB | 377 Q