3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php include'Forms/add.php'; $que= "SELECT * FROM email"; $result= mysql_query($que); while($em = mysql_fetch_array($result)) { echo "<h4>" .$em['name'] . "</h4>"; echo "<p>" .$em['email'] . "</p>"; echo "<p>" .$em['phone'] . "</p>"; echo "<p>" .$em['subject'] . "</p>"; echo "<p>" .$em['message'] . "</p>"; } ?> <h3>Contact me</h3> <form action="addmore.php" method="post"> Name: <input type="text" name="inputName" value="" /> Email:<input type="text" name="inputEmail" value="" /> </br> Phone Number:<input type="text" name="inputPhone" value="" /> </br> Subject: <input type="text" name="inputSubject" value="" /> </br> Message: <input type="text" name="inputMessage" value="" /> </br> </br> <input type="submit" name="submit" /> </form>
Output for 7.0.0 - 7.1.0
Warning: include(Forms/add.php): failed to open stream: No such file or directory in /in/f0IMI on line 2 Warning: include(): Failed opening 'Forms/add.php' for inclusion (include_path='.:') in /in/f0IMI on line 2 Fatal error: Uncaught Error: Call to undefined function mysql_query() in /in/f0IMI:6 Stack trace: #0 {main} thrown in /in/f0IMI on line 6
Process exited with code 255.
Output for hhvm-3.10.0 - 3.12.0
Warning: File not found: Forms/add.php in /in/f0IMI on line 2 Warning: supplied argument is not a valid MySQL-Link resource in /in/f0IMI on line 6 Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /in/f0IMI on line 8 <h3>Contact me</h3> <form action="addmore.php" method="post"> Name: <input type="text" name="inputName" value="" /> Email:<input type="text" name="inputEmail" value="" /> </br> Phone Number:<input type="text" name="inputPhone" value="" /> </br> Subject: <input type="text" name="inputSubject" value="" /> </br> Message: <input type="text" name="inputMessage" value="" /> </br> </br> <input type="submit" name="submit" /> </form>
Output for 5.1.0 - 5.6.28
Warning: include(Forms/add.php): failed to open stream: No such file or directory in /in/f0IMI on line 2 Warning: include(): Failed opening 'Forms/add.php' for inclusion (include_path='.:') in /in/f0IMI on line 2 Fatal error: Call to undefined function mysql_query() in /in/f0IMI on line 6
Process exited with code 255.
Output for 5.0.0 - 5.0.5
Warning: main(Forms/add.php): failed to open stream: No such file or directory in /in/f0IMI on line 2 Warning: main(): Failed opening 'Forms/add.php' for inclusion (include_path='.:') in /in/f0IMI on line 2 Fatal error: Call to undefined function mysql_query() in /in/f0IMI on line 6
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Warning: main(Forms/add.php): failed to open stream: No such file or directory in /in/f0IMI on line 2 Warning: main(): Failed opening 'Forms/add.php' for inclusion (include_path='.:') in /in/f0IMI on line 2 Warning: mysql_query(): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (13) in /in/f0IMI on line 6 Warning: mysql_query(): A link to the server could not be established in /in/f0IMI on line 6 Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /in/f0IMI on line 8 <h3>Contact me</h3> <form action="addmore.php" method="post"> Name: <input type="text" name="inputName" value="" /> Email:<input type="text" name="inputEmail" value="" /> </br> Phone Number:<input type="text" name="inputPhone" value="" /> </br> Subject: <input type="text" name="inputSubject" value="" /> </br> Message: <input type="text" name="inputMessage" value="" /> </br> </br> <input type="submit" name="submit" /> </form>
Output for 4.3.1
Warning: main(Forms/add.php) [http://www.php.net/function.main]: failed to create stream: No such file or directory in /in/f0IMI on line 2 Warning: main() [http://www.php.net/function.main]: Failed opening 'Forms/add.php' for inclusion (include_path='.:') in /in/f0IMI on line 2 Warning: mysql_query() [http://www.php.net/function.mysql-query]: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (13) in /in/f0IMI on line 6 Warning: mysql_query() [http://www.php.net/function.mysql-query]: A link to the server could not be established in /in/f0IMI on line 6 Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /in/f0IMI on line 8 <h3>Contact me</h3> <form action="addmore.php" method="post"> Name: <input type="text" name="inputName" value="" /> Email:<input type="text" name="inputEmail" value="" /> </br> Phone Number:<input type="text" name="inputPhone" value="" /> </br> Subject: <input type="text" name="inputSubject" value="" /> </br> Message: <input type="text" name="inputMessage" value="" /> </br> </br> <input type="submit" name="submit" /> </form>
Output for 4.3.0
Warning: main(Forms/add.php) [http://www.php.net/function.main]: failed to create stream: No such file or directory in /in/f0IMI on line 2 Warning: main() [http://www.php.net/function.main]: Failed opening 'Forms/add.php' for inclusion (include_path='.:') in /in/f0IMI on line 2 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/f0IMI on line 6 Warning: mysql_query() [http://www.php.net/function.mysql-query]: A link to the server could not be established in /in/f0IMI on line 6 Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /in/f0IMI on line 8 <h3>Contact me</h3> <form action="addmore.php" method="post"> Name: <input type="text" name="inputName" value="" /> Email:<input type="text" name="inputEmail" value="" /> </br> Phone Number:<input type="text" name="inputPhone" value="" /> </br> Subject: <input type="text" name="inputSubject" value="" /> </br> Message: <input type="text" name="inputMessage" value="" /> </br> </br> <input type="submit" name="submit" /> </form>