avmvldr Posted Sunday at 03:31 AM Share Posted Sunday at 03:31 AM In the attached image, please see the "IF" statment and it' conditions. Notice the grayed values "password:" and "hash:", which you can't delete because they're not really there. I'm using version 8.3.10 of PHP which I believe is the latest version. How do I remove this feature? Thanks, Blake Quote Link to comment Share on other sites More sharing options...
Moorcam Posted Sunday at 06:43 AM Share Posted Sunday at 06:43 AM Not sure of a "Setting" in PHP as such but try this: if (password_verify($password, $hashedPassword)) { $_SESSION['user_id'] = $user['id']; $_SESSION['handle'] = $user['user_handle']; echo "Login successful! Welcome, " . htmlspecialchars($username) . "."; } else { echo "Invalid username or password."; } I removed Named Parameters: The password_verify function does not support named parameters in PHP. Therefore, I removed the 'password:' syntax to ensure the code runs correctly. Quote Link to comment Share on other sites More sharing options...
Barand Posted Sunday at 08:13 AM Share Posted Sunday at 08:13 AM I suspect that the culprit is your IDE trying to be helpful. Check its settings. Quote Link to comment Share on other sites More sharing options...
maxxd Posted Sunday at 12:03 PM Share Posted Sunday at 12:03 PM That's a default feature of PHPStorm, at least. VSCode doesn't do it by default but I suspect there are plugins that will add the functionality. Quote Link to comment Share on other sites More sharing options...
gizmola Posted 7 hours ago Share Posted 7 hours ago Not sure why you would want to disable the hinting feature, which can be quite helpful in understanding what the parameters are for. However the instructions to do so are here: https://stackoverflow.com/questions/41743888/how-to-disable-parameter-name-hints-in-phpstorm Quote Link to comment Share on other sites More sharing options...
requinix Posted 6 hours ago Share Posted 6 hours ago 38 minutes ago, gizmola said: Not sure why you would want to disable the hinting feature, It might work a little more cleanly in PHPStorm, but when I tried it in VS Code, I found it much more complicated to try to select text or read through code when the editor was injecting those things into the view. Maybe if they weren't inline, though I can't imagine how not, they might be nicer for me... But I'm also a proponent of the idea that you should be able to tell what the parameter is, be that through a variable name or an obvious literal value (or a constant...), and if you can't tell then you should do something about that. // this is obvious on what the parameters are password_verify($password, $hashedPassword) // this is not password_verify($value, $row[1]) 1 1 Quote Link to comment Share on other sites More sharing options...
gizmola Posted 5 hours ago Share Posted 5 hours ago @requinix Are you using intelephense? For me I don't get his injection in VSCode, as mouseover pops up a window that shows me the information for the function call or method. Quote Link to comment Share on other sites More sharing options...
requinix Posted 4 hours ago Share Posted 4 hours ago I don't remember if Intelephense provided the feature or not. In fact I might not even have tried it with PHP - maybe it was another language. But I assume the concept works the same way everywhere. But yeah, the hover or autocomplete list has always been sufficient for me. Oh well, whatever works best for each person. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.