3v4l.org

run code in 300+ PHP versions simultaneously
<?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 git.master, git.master_jit, rfc.property-hooks
Warning: include_once(): open_basedir restriction in effect. File(config.php) is not within the allowed path(s): (/tmp:/in:/etc) in /in/dlli9 on line 3 Warning: include_once(config.php): Failed to open stream: Operation not permitted in /in/dlli9 on line 3 Warning: include_once(): Failed opening 'config.php' for inclusion (include_path='.:') in /in/dlli9 on line 3 Warning: Undefined array key "name" in /in/dlli9 on line 5 Warning: Undefined array key "grade" in /in/dlli9 on line 6 Warning: Undefined array key "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.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
42 ms | 402 KiB | 8 Q