I'm using Memcached in code, it shows this:
error: "Undefined type 'Memcached'."
How to disable this error? Version using: VScode 1.41 PHP Intelephense 1.3.5
You can disable the undefined type in intelephense vscode setting. To open the setting you can type ctrl + ,
You can add the Memcached
to intelephense.stubs
setting.
Reference: Undefined type Memcached
VS Code: 1.52.1
PHP Intelephense: 1.5.4
If your code is working, simply try and restart your ide, it should work. seems to be a bug , especially caused if you move files around directly in the file system. Otherwise correct your code then.
NB: The other solutions above may work but are hacks. They may be temporal fixes and lead to unwanted effects. Don't alter any IDE settings you do not understand or remember to reconfigure later, it can be such a pain to maintain your environment.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With