3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php include "config.php"; if(empty($_REQUEST["action"])) $template->display("join.html"); else { $username=$_REQUEST["username"]; $password=$_REQUEST["password"]; $email=$_REQUEST["email"]; $sponsor = @$_COOKIE["sponsor_id"]; if (!preg_match("^[a-zA-Z0-9.-_]+\@[a-zA-Z0-9.-_]\+.[a-zA-Z0-9.-_]+$",$email)); die ("Not a valid email format!"); if (!preg_match("^[A-Za-z0-9_]+$",$username)); die ("Username contains an unallowed characters"); $num=mysql_num_rows(mysql_query("select id from members where username ='$username'")); if ($num>0) die ("Username already taken"); $template->assign("custom_key",NEW_MEMBER . "|$username|$password|$email|$sponsor"); $template->assign("username",$username); $template->assign(array("aftersignup"=>$aftersignup, "cancel_page"=>$cancel_page)); $template->display("order.html"); }
Output for 7.0.5 - 7.1.0
Warning: include(config.php): failed to open stream: No such file or directory in /in/C5KPG on line 2 Warning: include(): Failed opening 'config.php' for inclusion (include_path='.:') in /in/C5KPG on line 2 Notice: Undefined variable: template in /in/C5KPG on line 4 Fatal error: Uncaught Error: Call to a member function display() on null in /in/C5KPG:4 Stack trace: #0 {main} thrown in /in/C5KPG on line 4
Process exited with code 255.
Output for 7.0.0 - 7.0.4
Warning: include(config.php): failed to open stream: No such file or directory in /in/C5KPG on line 2 Warning: include(): Failed opening 'config.php' for inclusion (include_path='.:') in /in/C5KPG on line 2 Notice: Undefined variable: template in /in/C5KPG on line 4 Fatal error: Uncaught Error: Call to a member function display() on unknown in /in/C5KPG:4 Stack trace: #0 {main} thrown in /in/C5KPG on line 4
Process exited with code 255.
Output for 5.6.0 - 5.6.28
Warning: include(config.php): failed to open stream: No such file or directory in /in/C5KPG on line 2 Warning: include(): Failed opening 'config.php' for inclusion (include_path='.:') in /in/C5KPG on line 2 Notice: Undefined variable: template in /in/C5KPG on line 4 Fatal error: Call to a member function display() on null in /in/C5KPG on line 4
Process exited with code 255.
Output for 5.1.0 - 5.5.36
Warning: include(config.php): failed to open stream: No such file or directory in /in/C5KPG on line 2 Warning: include(): Failed opening 'config.php' for inclusion (include_path='.:') in /in/C5KPG on line 2 Notice: Undefined variable: template in /in/C5KPG on line 4 Fatal error: Call to a member function display() on a non-object in /in/C5KPG on line 4
Process exited with code 255.
Output for 5.0.4 - 5.0.5
Warning: main(config.php): failed to open stream: No such file or directory in /in/C5KPG on line 2 Warning: main(): Failed opening 'config.php' for inclusion (include_path='.:') in /in/C5KPG on line 2 Notice: Undefined variable: template in /in/C5KPG on line 4 Fatal error: Call to a member function display() on a non-object in /in/C5KPG on line 4
Process exited with code 255.
Output for 5.0.0 - 5.0.3
Warning: main(config.php): failed to open stream: No such file or directory in /in/C5KPG on line 2 Warning: main(): Failed opening 'config.php' for inclusion (include_path='.:') in /in/C5KPG on line 2 Notice: Undefined variable: template in /in/C5KPG on line 4 Fatal error: Call to a member function display() on a non-object in /in/C5KPG on line 4
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/C5KPG on line 2 Warning: main(): Failed opening 'config.php' for inclusion (include_path='.:') in /in/C5KPG on line 2 Fatal error: Call to a member function on a non-object in /in/C5KPG on line 4
Process exited with code 255.
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/C5KPG on line 2 Warning: main() [http://www.php.net/function.main]: Failed opening 'config.php' for inclusion (include_path='.:') in /in/C5KPG on line 2 Fatal error: Call to a member function on a non-object in /in/C5KPG on line 4