avmvldr Posted November 3 Share Posted November 3 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 https://forums.phpfreaks.com/topic/325320-what-php-setting-will-remove-this-feature/ Share on other sites More sharing options...
Moorcam Posted November 3 Share Posted November 3 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 https://forums.phpfreaks.com/topic/325320-what-php-setting-will-remove-this-feature/#findComment-1639280 Share on other sites More sharing options...
Barand Posted November 3 Share Posted November 3 I suspect that the culprit is your IDE trying to be helpful. Check its settings. Quote Link to comment https://forums.phpfreaks.com/topic/325320-what-php-setting-will-remove-this-feature/#findComment-1639292 Share on other sites More sharing options...
maxxd Posted November 3 Share Posted November 3 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 https://forums.phpfreaks.com/topic/325320-what-php-setting-will-remove-this-feature/#findComment-1639304 Share on other sites More sharing options...
gizmola Posted November 5 Share Posted November 5 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 https://forums.phpfreaks.com/topic/325320-what-php-setting-will-remove-this-feature/#findComment-1639406 Share on other sites More sharing options...
requinix Posted November 5 Share Posted November 5 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 https://forums.phpfreaks.com/topic/325320-what-php-setting-will-remove-this-feature/#findComment-1639409 Share on other sites More sharing options...
gizmola Posted November 5 Share Posted November 5 @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 https://forums.phpfreaks.com/topic/325320-what-php-setting-will-remove-this-feature/#findComment-1639411 Share on other sites More sharing options...
requinix Posted November 5 Share Posted November 5 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 https://forums.phpfreaks.com/topic/325320-what-php-setting-will-remove-this-feature/#findComment-1639419 Share on other sites More sharing options...
maxxd Posted November 6 Share Posted November 6 I also use intelephense in VSCode and I don't see it like it's shown in phpstorm. I have to admit i very much prefer popup on hover over inline. Quote Link to comment https://forums.phpfreaks.com/topic/325320-what-php-setting-will-remove-this-feature/#findComment-1639445 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.