3v4l.org

run code in 300+ PHP versions simultaneously
<?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 git.master, git.master_jit, rfc.property-hooks
Warning: include(): open_basedir restriction in effect. File(includes/functions.php) is not within the allowed path(s): (/tmp:/in:/etc) in /in/LPPVm on line 2 Warning: include(includes/functions.php): Failed to open stream: Operation not permitted 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.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
40.45 ms | 401 KiB | 8 Q