3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<html> <head> <title>Profil - Freundesystem</title> <link rel='stylesheet' href='style.css' /> </head> <body> <?php include 'connect.php'; ?> <?php include 'functions.php'; ?> <?php include 'header.php'; ?> <div class='container'> <?php if(isset($_GET['user']) && !empty($_GET['user'])){ $user = $_GET['user']; } else { $user = $_SESSION['user_id']; } $my_id = $_SESSION['user_id']; $username = getuser($user, 'username'); ?> <h3><?php echo $username; ?></h3> <?php if($user != $my_id){ $check_friend_query = mysql_query("SELECT id FROM friends WHERE (user_one='$my_id' AND user_two='$user') OR (user_one='$user' AND user_two='$my_id')"); if(mysql_num_rows($check_friend_query) == 1){ echo "<a href='#' class='box'>Already Friends</a> | <a href='#' class='box'>Unfriend $username</a>"; } else { $myfrom_query = mysql_query("SELECT `id` FROM `friend_req` WHERE `myfrom`='$user' AND `myto`='$my_id'"); $myto_query = mysql_query("SELECT `id` FROM `friend_req` WHERE `myfrom`='$my_id' AND `myto`='$user'"); if(mysql_num_rows($myfrom_query) == 1){ echo "<a href='#' class='box'>Ignore</a> | <a href='' class='box'>Accept</a>"; } else if (mysql_num_rows($myto_query) == 1){ echo "<a href='#' class='box'>Cancel Request</a>"; } else { echo "<a href='#' class='box'>Send Friend Request</a>"; } } } ?> </div> </body> </html>
Output for 7.0.0 - 7.1.0
<html> <head> <title>Profil - Freundesystem</title> <link rel='stylesheet' href='style.css' /> </head> <body> Warning: include(connect.php): failed to open stream: No such file or directory in /in/CuXMr on line 7 Warning: include(): Failed opening 'connect.php' for inclusion (include_path='.:') in /in/CuXMr on line 7 Warning: include(functions.php): failed to open stream: No such file or directory in /in/CuXMr on line 9 Warning: include(): Failed opening 'functions.php' for inclusion (include_path='.:') in /in/CuXMr on line 9 Warning: include(header.php): failed to open stream: No such file or directory in /in/CuXMr on line 11 Warning: include(): Failed opening 'header.php' for inclusion (include_path='.:') in /in/CuXMr on line 11 <div class='container'> Notice: Undefined variable: _SESSION in /in/CuXMr on line 18 Notice: Undefined variable: _SESSION in /in/CuXMr on line 20 Fatal error: Uncaught Error: Call to undefined function getuser() in /in/CuXMr:21 Stack trace: #0 {main} thrown in /in/CuXMr on line 21
Process exited with code 255.
Output for hhvm-3.12.0
<html> <head> <title>Profil - Freundesystem</title> <link rel='stylesheet' href='style.css' /> </head> <body> Warning: File not found: connect.php in /in/CuXMr on line 7 Warning: File not found: functions.php in /in/CuXMr on line 9 Warning: File not found: header.php in /in/CuXMr on line 11 <div class='container'> Notice: Undefined index: user_id in /in/CuXMr on line 18 Notice: Undefined index: user_id in /in/CuXMr on line 20 Fatal error: Uncaught Error: Call to undefined function getuser() in /in/CuXMr:21 Stack trace: #0 {main}
Process exited with code 255.
Output for hhvm-3.10.0
<html> <head> <title>Profil - Freundesystem</title> <link rel='stylesheet' href='style.css' /> </head> <body> Warning: File not found: connect.php in /in/CuXMr on line 7 Warning: File not found: functions.php in /in/CuXMr on line 9 Warning: File not found: header.php in /in/CuXMr on line 11 <div class='container'> Notice: Undefined index: user_id in /in/CuXMr on line 18 Notice: Undefined index: user_id in /in/CuXMr on line 20 Fatal error: Call to undefined function getuser() in /in/CuXMr on line 21
Process exited with code 255.
Output for 5.1.0 - 5.6.28
<html> <head> <title>Profil - Freundesystem</title> <link rel='stylesheet' href='style.css' /> </head> <body> Warning: include(connect.php): failed to open stream: No such file or directory in /in/CuXMr on line 7 Warning: include(): Failed opening 'connect.php' for inclusion (include_path='.:') in /in/CuXMr on line 7 Warning: include(functions.php): failed to open stream: No such file or directory in /in/CuXMr on line 9 Warning: include(): Failed opening 'functions.php' for inclusion (include_path='.:') in /in/CuXMr on line 9 Warning: include(header.php): failed to open stream: No such file or directory in /in/CuXMr on line 11 Warning: include(): Failed opening 'header.php' for inclusion (include_path='.:') in /in/CuXMr on line 11 <div class='container'> Notice: Undefined variable: _SESSION in /in/CuXMr on line 18 Notice: Undefined variable: _SESSION in /in/CuXMr on line 20 Fatal error: Call to undefined function getuser() in /in/CuXMr on line 21
Process exited with code 255.
Output for 5.0.4 - 5.0.5
<html> <head> <title>Profil - Freundesystem</title> <link rel='stylesheet' href='style.css' /> </head> <body> Warning: main(connect.php): failed to open stream: No such file or directory in /in/CuXMr on line 7 Warning: main(): Failed opening 'connect.php' for inclusion (include_path='.:') in /in/CuXMr on line 7 Warning: main(functions.php): failed to open stream: No such file or directory in /in/CuXMr on line 9 Warning: main(): Failed opening 'functions.php' for inclusion (include_path='.:') in /in/CuXMr on line 9 Warning: main(header.php): failed to open stream: No such file or directory in /in/CuXMr on line 11 Warning: main(): Failed opening 'header.php' for inclusion (include_path='.:') in /in/CuXMr on line 11 <div class='container'> Notice: Undefined variable: _SESSION in /in/CuXMr on line 18 Notice: Undefined variable: _SESSION in /in/CuXMr on line 20 Fatal error: Call to undefined function getuser() in /in/CuXMr on line 21
Process exited with code 255.
Output for 5.0.0 - 5.0.3
<html> <head> <title>Profil - Freundesystem</title> <link rel='stylesheet' href='style.css' /> </head> <body> Warning: main(connect.php): failed to open stream: No such file or directory in /in/CuXMr on line 7 Warning: main(): Failed opening 'connect.php' for inclusion (include_path='.:') in /in/CuXMr on line 7 Warning: main(functions.php): failed to open stream: No such file or directory in /in/CuXMr on line 9 Warning: main(): Failed opening 'functions.php' for inclusion (include_path='.:') in /in/CuXMr on line 9 Warning: main(header.php): failed to open stream: No such file or directory in /in/CuXMr on line 11 Warning: main(): Failed opening 'header.php' for inclusion (include_path='.:') in /in/CuXMr on line 11 <div class='container'> Notice: Undefined variable: _SESSION in /in/CuXMr on line 18 Notice: Undefined variable: _SESSION in /in/CuXMr on line 20 Fatal error: Call to undefined function getuser() in /in/CuXMr on line 21
Process exited with code 255.
Output for 4.4.5 - 4.4.9
<html> <head> <title>Profil - Freundesystem</title> <link rel='stylesheet' href='style.css' /> </head> <body> Warning: main(connect.php): failed to open stream: No such file or directory in /in/CuXMr on line 7 Warning: main(): Failed opening 'connect.php' for inclusion (include_path='.:') in /in/CuXMr on line 7 Warning: main(functions.php): failed to open stream: No such file or directory in /in/CuXMr on line 9 Warning: main(): Failed opening 'functions.php' for inclusion (include_path='.:') in /in/CuXMr on line 9 Warning: main(header.php): failed to open stream: No such file or directory in /in/CuXMr on line 11 Warning: main(): Failed opening 'header.php' for inclusion (include_path='.:') in /in/CuXMr on line 11 <div class='container'> Notice: Undefined variable: _SESSION in /in/CuXMr on line 18 Notice: Undefined variable: _SESSION in /in/CuXMr on line 20 Fatal error: Call to undefined function: getuser() in /in/CuXMr on line 21
Process exited with code 255.
Output for 4.3.2 - 4.4.4
<html> <head> <title>Profil - Freundesystem</title> <link rel='stylesheet' href='style.css' /> </head> <body> Warning: main(connect.php): failed to open stream: No such file or directory in /in/CuXMr on line 7 Warning: main(): Failed opening 'connect.php' for inclusion (include_path='.:') in /in/CuXMr on line 7 Warning: main(functions.php): failed to open stream: No such file or directory in /in/CuXMr on line 9 Warning: main(): Failed opening 'functions.php' for inclusion (include_path='.:') in /in/CuXMr on line 9 Warning: main(header.php): failed to open stream: No such file or directory in /in/CuXMr on line 11 Warning: main(): Failed opening 'header.php' for inclusion (include_path='.:') in /in/CuXMr on line 11 <div class='container'> Notice: Undefined variable: _SESSION in /in/CuXMr on line 18 Notice: Undefined variable: _SESSION in /in/CuXMr on line 20 Fatal error: Call to undefined function: getuser() in /in/CuXMr on line 21
Process exited with code 255.
Output for 4.3.0 - 4.3.1
<html> <head> <title>Profil - Freundesystem</title> <link rel='stylesheet' href='style.css' /> </head> <body> Warning: main(connect.php) [http://www.php.net/function.main]: failed to create stream: No such file or directory in /in/CuXMr on line 7 Warning: main() [http://www.php.net/function.main]: Failed opening 'connect.php' for inclusion (include_path='.:') in /in/CuXMr on line 7 Warning: main(functions.php) [http://www.php.net/function.main]: failed to create stream: No such file or directory in /in/CuXMr on line 9 Warning: main() [http://www.php.net/function.main]: Failed opening 'functions.php' for inclusion (include_path='.:') in /in/CuXMr on line 9 Warning: main(header.php) [http://www.php.net/function.main]: failed to create stream: No such file or directory in /in/CuXMr on line 11 Warning: main() [http://www.php.net/function.main]: Failed opening 'header.php' for inclusion (include_path='.:') in /in/CuXMr on line 11 <div class='container'> Notice: Undefined variable: _SESSION in /in/CuXMr on line 18 Notice: Undefined variable: _SESSION in /in/CuXMr on line 20 Fatal error: Call to undefined function: getuser() in /in/CuXMr on line 21