3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php include_once('config.php'); $name=$_POST['name']; $grade=$_POST['grade']; $dept=$_POST['dept']; $sql="INSERT INTO member(Name, Grade, Dept) VALUES('".$name."','".$grade."','".$dept."')"; mysql_query($sql) or die(mysql_error()); include 'config.php'; mysql_select_db("dept_db",$conf); //$select=mysql_query("Select * from skype_tb where ID=1"); //$select=mysql_query("Select * from reg_fb where ID between 4 and 6"); //$select=mysql_query("Select * from reg_fb where ID != 5"); //$select=mysql_query("Select * from reg_fb where ID <5"); //$select=mysql_query("Select * from reg_fb where First_Name like '%n'"); $select=mysql_query("Select * from member"); echo "<table border=2>"; echo "<tr>"; echo "<th> ID </th>"; echo "<th> Name </th>"; echo "<th> Grade </th>"; echo "<th> Department </th>"; echo "</tr>"; while($row = mysql_fetch_array($select)) { echo "<tr>"; echo "<td>" .$row['ID']. " </td>"; echo "<td>" .$row['Name']. "</td>"; echo "<td>" .$row['Grade']. "</td>"; echo "<td>" .$row['Dept']. "</td>"; echo "</tr>"; } echo "</table>"; ?>
Output for 7.0.0 - 7.1.0
Warning: include_once(config.php): failed to open stream: No such file or directory in /in/dlli9 on line 3 Warning: include_once(): Failed opening 'config.php' for inclusion (include_path='.:') in /in/dlli9 on line 3 Notice: Undefined index: name in /in/dlli9 on line 5 Notice: Undefined index: grade in /in/dlli9 on line 6 Notice: Undefined index: dept in /in/dlli9 on line 7 Fatal error: Uncaught Error: Call to undefined function mysql_query() in /in/dlli9:13 Stack trace: #0 {main} thrown in /in/dlli9 on line 13
Process exited with code 255.
Output for 5.3.0 - 5.6.28
Warning: include_once(config.php): failed to open stream: No such file or directory in /in/dlli9 on line 3 Warning: include_once(): Failed opening 'config.php' for inclusion (include_path='.:') in /in/dlli9 on line 3 Notice: Undefined index: name in /in/dlli9 on line 5 Notice: Undefined index: grade in /in/dlli9 on line 6 Notice: Undefined index: dept in /in/dlli9 on line 7 Fatal error: Call to undefined function mysql_query() in /in/dlli9 on line 13
Process exited with code 255.
Output for 5.1.0 - 5.2.17
Warning: include_once(config.php): failed to open stream: No such file or directory in /in/dlli9 on line 3 Warning: include_once(): Failed opening 'config.php' for inclusion (include_path='.:') in /in/dlli9 on line 3 Notice: Undefined index: name in /in/dlli9 on line 5 Notice: Undefined index: grade in /in/dlli9 on line 6 Notice: Undefined index: dept in /in/dlli9 on line 7 Fatal error: Call to undefined function mysql_query() in /in/dlli9 on line 13
Process exited with code 255.
Output for 5.0.0 - 5.0.5
Warning: main(config.php): failed to open stream: No such file or directory in /in/dlli9 on line 3 Warning: main(): Failed opening 'config.php' for inclusion (include_path='.:') in /in/dlli9 on line 3 Notice: Undefined index: name in /in/dlli9 on line 5 Notice: Undefined index: grade in /in/dlli9 on line 6 Notice: Undefined index: dept in /in/dlli9 on line 7 Fatal error: Call to undefined function mysql_query() in /in/dlli9 on line 13
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Warning: main(config.php): failed to open stream: No such file or directory in /in/dlli9 on line 3 Warning: main(): Failed opening 'config.php' for inclusion (include_path='.:') in /in/dlli9 on line 3 Notice: Undefined index: name in /in/dlli9 on line 5 Notice: Undefined index: grade in /in/dlli9 on line 6 Notice: Undefined index: dept in /in/dlli9 on line 7 Warning: mysql_query(): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /in/dlli9 on line 13 Warning: mysql_query(): A link to the server could not be established in /in/dlli9 on line 13 Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
Output for 4.3.0 - 4.3.1
Warning: main(config.php) [http://www.php.net/function.main]: failed to create stream: No such file or directory in /in/dlli9 on line 3 Warning: main() [http://www.php.net/function.main]: Failed opening 'config.php' for inclusion (include_path='.:') in /in/dlli9 on line 3 Notice: Undefined index: name in /in/dlli9 on line 5 Notice: Undefined index: grade in /in/dlli9 on line 6 Notice: Undefined index: dept in /in/dlli9 on line 7 Warning: mysql_query() [http://www.php.net/function.mysql-query]: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /in/dlli9 on line 13 Warning: mysql_query() [http://www.php.net/function.mysql-query]: A link to the server could not be established in /in/dlli9 on line 13 Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)