3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php session_start(); //Munkamenet-kezeléshez kell // Ha rányomunk az űrlapot elküldő gombra... if ($_POST["submit"] == "Be! A Vörös Hadseregbe!") { //...ellenőrizzük, hogy jó-e a jelszó if ($_POST["pw"] == "Raszputyin") { $_SESSION["loggedin"] = true; } else { $_SESSION["loggedin"] = false; } } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Jelszópélda</title> </head> <body> <div id="container" style="text-align: center;"> <p><img src="http://upload.wikimedia.org/wikipedia/commons/thumb/7/7d/Red_army_conscript_hat_insignia.jpg/150px-Red_army_conscript_hat_insignia.jpg" alt="Vörös Hadsereg" /></p> <?php if ($_SESSION["loggedin"] == false) { ?> <form id="myform" action="" method="post"> <p> <label for="pw">Jelszó</label>: <input type="password" name="pw" id="pw" /> </p> <p> <input style="color:red;" type="submit" name="submit" id="submit"value="Be! A Vörös Hadseregbe!" /> </p> </form> <?php } else { ?> <p style="color:red;">Sikeres bejelentkezés! Üdvözlünk Elvtárs!</p> <?php } ?> </body> </html>
Output for 5.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Notice: Undefined index: submit in /in/07INX on line 4 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Jelszópélda</title> </head> <body> <div id="container" style="text-align: center;"> <p><img src="http://upload.wikimedia.org/wikipedia/commons/thumb/7/7d/Red_army_conscript_hat_insignia.jpg/150px-Red_army_conscript_hat_insignia.jpg" alt="Vörös Hadsereg" /></p> Notice: Undefined index: loggedin in /in/07INX on line 23 <form id="myform" action="" method="post"> <p> <label for="pw">Jelszó</label>: <input type="password" name="pw" id="pw" /> </p> <p> <input style="color:red;" type="submit" name="submit" id="submit"value="Be! A Vörös Hadseregbe!" /> </p> </form> </body> </html>
Output for 5.2.3 - 5.2.17
Notice: Undefined index: submit in /in/07INX on line 4 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Jelszópélda</title> </head> <body> <div id="container" style="text-align: center;"> <p><img src="http://upload.wikimedia.org/wikipedia/commons/thumb/7/7d/Red_army_conscript_hat_insignia.jpg/150px-Red_army_conscript_hat_insignia.jpg" alt="Vörös Hadsereg" /></p> Notice: Undefined index: loggedin in /in/07INX on line 23 <form id="myform" action="" method="post"> <p> <label for="pw">Jelszó</label>: <input type="password" name="pw" id="pw" /> </p> <p> <input style="color:red;" type="submit" name="submit" id="submit"value="Be! A Vörös Hadseregbe!" /> </p> </form> </body> </html>
Output for 4.3.2 - 5.2.2
Warning: session_start(): Cannot send session cookie - headers already sent in /in/07INX on line 2 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /in/07INX:2) in /in/07INX on line 2 Notice: Undefined index: submit in /in/07INX on line 4 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Jelszópélda</title> </head> <body> <div id="container" style="text-align: center;"> <p><img src="http://upload.wikimedia.org/wikipedia/commons/thumb/7/7d/Red_army_conscript_hat_insignia.jpg/150px-Red_army_conscript_hat_insignia.jpg" alt="Vörös Hadsereg" /></p> Notice: Undefined index: loggedin in /in/07INX on line 23 <form id="myform" action="" method="post"> <p> <label for="pw">Jelszó</label>: <input type="password" name="pw" id="pw" /> </p> <p> <input style="color:red;" type="submit" name="submit" id="submit"value="Be! A Vörös Hadseregbe!" /> </p> </form> </body> </html>
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/07INX 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/07INX:2) in /in/07INX on line 2 Notice: Undefined index: submit in /in/07INX on line 4 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Jelszópélda</title> </head> <body> <div id="container" style="text-align: center;"> <p><img src="http://upload.wikimedia.org/wikipedia/commons/thumb/7/7d/Red_army_conscript_hat_insignia.jpg/150px-Red_army_conscript_hat_insignia.jpg" alt="Vörös Hadsereg" /></p> Notice: Undefined index: loggedin in /in/07INX on line 23 <form id="myform" action="" method="post"> <p> <label for="pw">Jelszó</label>: <input type="password" name="pw" id="pw" /> </p> <p> <input style="color:red;" type="submit" name="submit" id="submit"value="Be! A Vörös Hadseregbe!" /> </p> </form> </body> </html>