Go to Definition or F12 is not working in VSCode in PHP environment. The easy solution is to install Php PHP Intelephense
- Go to VS code editor.
- In editor, Press Ctrl+Shift+X
- Extension window will appear on the left side of the editor
- On Top search bar, write PHP Intelephense and search
- Currently PHP Intelephense 1.7.1 version is appearing. Click on it and install
Now you can go to definition by pressing F12





