3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php session_start(); include_once 'include/validasiUser.php'; $user = new User(); if ($user->get_session()) { header("location:proses.php"); } if ($_SERVER["REQUEST_METHOD"] == "POST") { $login = $user->check_login($_POST['emailusername'], $_POST['password']); if ($login) { // Login Berhasil header("location:index.php"); } else { // Login Gagal echo '<center><b>Maaf, Email atau password yang anda masukkan <u>salah</u></b></center>'; } } ?> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>FORM LOGIN</title> <style> body { font-family:Arial, Helvetica, sans-serif; } </style> </head> <body> <div id="container"><center> <div id="main-body"> <br/><br/> <form method="POST" action="" id="login_form" name="login"> <div class="head"> <b> LOGIN DISINI,<br><i>Email = afayuraputra@gmail.com</i> dan <i>Password = 115060800111025</i></b><br/><br/> </div> <label>Email </label><br/> <input type="text" name="emailusername" required="true"/><br/> <br/> <label>Password</label><br/> <input type="password" name="password" id="password" required="true"/><br/><br/> <input type="hidden" name="flag" value="login"/> <input type="submit" name="login_btn" onclick="return( submitregistration());" value="Login"/><br/><br/> </form> </div> </center> </div> </body> </html>
Output for 7.0.0 - 7.1.0
Warning: include_once(include/validasiUser.php): failed to open stream: No such file or directory in /in/EPf03 on line 3 Warning: include_once(): Failed opening 'include/validasiUser.php' for inclusion (include_path='.:') in /in/EPf03 on line 3 Fatal error: Uncaught Error: Class 'User' not found in /in/EPf03:4 Stack trace: #0 {main} thrown in /in/EPf03 on line 4
Process exited with code 255.
Output for 5.2.3 - 5.6.28
Warning: include_once(include/validasiUser.php): failed to open stream: No such file or directory in /in/EPf03 on line 3 Warning: include_once(): Failed opening 'include/validasiUser.php' for inclusion (include_path='.:') in /in/EPf03 on line 3 Fatal error: Class 'User' not found in /in/EPf03 on line 4
Process exited with code 255.
Output for 5.1.0 - 5.2.2
Warning: session_start(): Cannot send session cookie - headers already sent in /in/EPf03 on line 2 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /in/EPf03:2) in /in/EPf03 on line 2 Warning: include_once(include/validasiUser.php): failed to open stream: No such file or directory in /in/EPf03 on line 3 Warning: include_once(): Failed opening 'include/validasiUser.php' for inclusion (include_path='.:') in /in/EPf03 on line 3 Fatal error: Class 'User' not found in /in/EPf03 on line 4
Process exited with code 255.
Output for 5.0.0 - 5.0.5
Warning: session_start(): Cannot send session cookie - headers already sent in /in/EPf03 on line 2 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /in/EPf03:2) in /in/EPf03 on line 2 Warning: main(include/validasiUser.php): failed to open stream: No such file or directory in /in/EPf03 on line 3 Warning: main(): Failed opening 'include/validasiUser.php' for inclusion (include_path='.:') in /in/EPf03 on line 3 Fatal error: Class 'User' not found in /in/EPf03 on line 4
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Warning: session_start(): Cannot send session cookie - headers already sent in /in/EPf03 on line 2 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /in/EPf03:2) in /in/EPf03 on line 2 Warning: main(include/validasiUser.php): failed to open stream: No such file or directory in /in/EPf03 on line 3 Warning: main(): Failed opening 'include/validasiUser.php' for inclusion (include_path='.:') in /in/EPf03 on line 3 Fatal error: Cannot instantiate non-existent class: user in /in/EPf03 on line 4
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Warning: session_start() [http://www.php.net/function.session-start]: Cannot send session cookie - headers already sent in /in/EPf03 on line 2 Warning: session_start() [http://www.php.net/function.session-start]: Cannot send session cache limiter - headers already sent (output started at /in/EPf03:2) in /in/EPf03 on line 2 Warning: main(include/validasiUser.php) [http://www.php.net/function.main]: failed to create stream: No such file or directory in /in/EPf03 on line 3 Warning: main() [http://www.php.net/function.main]: Failed opening 'include/validasiUser.php' for inclusion (include_path='.:') in /in/EPf03 on line 3 Fatal error: Cannot instantiate non-existent class: user in /in/EPf03 on line 4