3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<div class="artical"> <?php $username = "root"; $password = ""; $database = "techinsight"; $server = "127.0.0.1"; $db_handle = mysql_connect($server, $username, $password); $db_found = mysql_select_db($database, $db_handle); if ($db_found) { $SQL= "SELECT * from questions"; $result= mysql_query($SQL); while($db_field=mysql_fetch_assoc($result)) { $x=$db_field['Qid']; while($x==1 && $x==NULL) { $SQL= "SELECT * from questions"; $result= mysql_query($SQL); $db_field=mysql_fetch_assoc($result); $x=$db_field['Qid']; } } if($x==$x) { for($x; $x>0; $x--) { $SQL= "SELECT * from questions WHERE Qid=$x"; $result= mysql_query($SQL); $db_field=mysql_fetch_assoc($result); $str_que= $db_field['question']; echo "<div class='dabba'> <div class='block_a'> <?php include('a.php'); ?> //here it is. </div> <br> <div class='block_b'> it is 2nd section. <br> <div><br> <div class='block_c'> last one.<br> </div> </div> <br><br>"; } } } ?> </div>
Output for 7.0.0 - 7.1.0
<div class="artical"> Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /in/c9I55:8 Stack trace: #0 {main} thrown in /in/c9I55 on line 8
Process exited with code 255.
Output for 5.0.0 - 5.6.28
<div class="artical"> Fatal error: Call to undefined function mysql_connect() in /in/c9I55 on line 8
Process exited with code 255.
Output for 4.3.2 - 4.4.9
<div class="artical"> Warning: mysql_connect(): Can't connect to MySQL server on '127.0.0.1' (101) in /in/c9I55 on line 8 Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /in/c9I55 on line 9 </div>
Output for 4.3.1
<div class="artical"> Warning: mysql_connect() [http://www.php.net/function.mysql-connect]: Can't connect to MySQL server on '127.0.0.1' (101) in /in/c9I55 on line 8 Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /in/c9I55 on line 9 </div>
Output for 4.3.0
<div class="artical"> Warning: mysql_connect() [http://www.php.net/function.mysql-connect]: Can't connect to MySQL server on '127.0.0.1' (111) in /in/c9I55 on line 8 Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /in/c9I55 on line 9 </div>