3v4l.org

run code in 300+ PHP versions simultaneously
<?php //Nate Lundie require("funcs.php"); connectDB(); $email = $_GET['n']; $old_pass = $_GET['op']; $new_pass = $_GET['np']; $results = "SELECT * FROM app_users WHERE email = '$email'"; $info = mysql_fetch_array(mysql_query($results)); $hash = info['password']; //if(password_verify($old_pass, $hash)) //{ $new_pass_hashed = password_hash("$new_pass", PASSWORD_DEFAULT); mysql_query("UPDATE app_users SET password= '$new_pass_hashed' WHERE email= '$email'"); die("your password has been updated, please login with your new info"): //} //else{ // die("Old Password does not match"); //} ?>
Output for 5.3.0 - 5.3.28, 5.4.0 - 5.4.28
Parse error: syntax error, unexpected '[' in /in/GC198 on line 10
Process exited with code 255.

preferences:
196.88 ms | 1395 KiB | 65 Q