3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php include 'includes/functions.php'; my_header("Регистрация"); if (!isset($_SESSION[' isLogged ']) == true) { if ($_POST) { $username = trim($_POST['username']); $pass = trim($_POST['pass']) ; $pass2 = trim($_POST['pass2']); $email = trim($_POST['email']); $error_array=array(); if (strlen($username) < 5) { $error_array['username'] = 'Кратко име.Трябва да е поне 4 синвола!'; } if (strlen($pass) < 4) { $error_array['pass'] = 'Кратка парола!'; } if ($pass != $pass2) { $error_array['pass2'] = 'Паролите не въпадат!'; } if (!preg_match("/^([a-zA-Z0-9])+([a-zA-Z0-9\._-])*@([a-zA-Z0-9_-])+([a-zA-Z0-9\._-]+)+$/", $email)) { $error_array['email'] = 'Невалиден Email адрес!'; } if (!preg_match("/^[a-zA-Z0-9_]{5,16}$/", $username)) { $error_array['username'] = 'Невалидно име!'; } if (!isset($error_array) > 0) { $query->query($dbconnect, 'SELECT * FROM users WHERE user_name="'.$username.'" AND user_mail="'.$email.'"'); if ($query->num_rows) { echo '<center><b><h1>Username or Email is busy.Please try again!</h1></b></center>'; header("refresh:2;url=register.php"); exit; } else { mysqli_query($dbconnect, 'INSERT INTO users (user_name,user_pass,user_mail) VALUES("' . addslashes($username) . '","' . addslashes($pass) . '","' . addslashes($email) . '")'); echo '<center><h1><b>Registered is success!</b></h1></center>'; header("refresh:2;url=index.php"); exit; } } else { echo '<center><h1><b>All fields are required!</b></h1></center>'; } } else { echo '<center><h1><b>Registered is not complete!</b></h1></center>'; } } else { echo '<center><h1><b>Вече сте влезли в системата!</h1></b></center>'; header("refresh:2;url=index.php"); exit; }
Output for 7.0.0 - 7.1.0
Warning: include(includes/functions.php): failed to open stream: No such file or directory in /in/LPPVm on line 2 Warning: include(): Failed opening 'includes/functions.php' for inclusion (include_path='.:') in /in/LPPVm on line 2 Fatal error: Uncaught Error: Call to undefined function my_header() in /in/LPPVm:3 Stack trace: #0 {main} thrown in /in/LPPVm on line 3
Process exited with code 255.
Output for 5.1.0 - 5.6.28
Warning: include(includes/functions.php): failed to open stream: No such file or directory in /in/LPPVm on line 2 Warning: include(): Failed opening 'includes/functions.php' for inclusion (include_path='.:') in /in/LPPVm on line 2 Fatal error: Call to undefined function my_header() in /in/LPPVm on line 3
Process exited with code 255.
Output for 5.0.0 - 5.0.5
Warning: main(includes/functions.php): failed to open stream: No such file or directory in /in/LPPVm on line 2 Warning: main(): Failed opening 'includes/functions.php' for inclusion (include_path='.:') in /in/LPPVm on line 2 Fatal error: Call to undefined function my_header() in /in/LPPVm on line 3
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Warning: main(includes/functions.php): failed to open stream: No such file or directory in /in/LPPVm on line 2 Warning: main(): Failed opening 'includes/functions.php' for inclusion (include_path='.:') in /in/LPPVm on line 2 Fatal error: Call to undefined function: my_header() in /in/LPPVm on line 3
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Warning: main(includes/functions.php): failed to open stream: No such file or directory in /in/LPPVm on line 2 Warning: main(): Failed opening 'includes/functions.php' for inclusion (include_path='.:') in /in/LPPVm on line 2 Fatal error: Call to undefined function: my_header() in /in/LPPVm on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Warning: main(includes/functions.php) [http://www.php.net/function.main]: failed to create stream: No such file or directory in /in/LPPVm on line 2 Warning: main() [http://www.php.net/function.main]: Failed opening 'includes/functions.php' for inclusion (include_path='.:') in /in/LPPVm on line 2 Fatal error: Call to undefined function: my_header() in /in/LPPVm on line 3