php intelephense license key
PHP Intelephense
Ben Mewburn
Intelephense
PHP code intelligence for Visual Studio Code.
Intelephense is a high performance PHP language server packed full of essential features for productive PHP development.
Licence
Purchase a licence at https://intelephense.com to access PREMIUM features. Licence keys grant a single user access to all current and future premium features on multiple devices forever. Licence keys must be activated (automatically) via https before use. Features not marked as PREMIUM are free and always will be free.
The language server client (vscode-intelephense) is open source and licensed under the MIT licence.
The language server (intelephense) is proprietary. Please see here for details.
Quick Start
Disable the built-in VSCode PHP Language Features.
Note that other (3rd party) PHP extensions which provide similar functionality should also be disabled for best results.
Add glob patterns for non standard php file extensions to the files.associations setting.
For example: «files.associations»: < "*.module": "php" >.
Further configuration options are available in the intelephense section of settings.
Support
Found a bug? Got a feature request? Create an issue.
Acknowledgements
A big thank you to supporters who have bought a premium licence and have enabled the continued development and maintenance of this extension.
Intelephense uses the following open source libraries. Please see the following links for source code and licences.
Php intelephense license key
PHP code intelligence for Visual Studio Code.
Intelephense is a high performance PHP language server packed full of essential features for productive PHP development.
Purchase a licence at https://intelephense.com to access PREMIUM features. Licence keys grant a single user access to all current and future premium features on multiple devices forever. Licence keys must be activated (automatically) via https before use. Features not marked as PREMIUM are free and always will be free.
The language server client (vscode-intelephense) is open source and licensed under the MIT licence.
The language server (intelephense) is proprietary. Please see here for details.
Disable the built-in VSCode PHP Language Features.
Note that other (3rd party) PHP extensions which provide similar functionality should also be disabled for best results.
Add glob patterns for non standard php file extensions to the files.associations setting.
For example: «files.associations»: < "*.module": "php" >.
Further configuration options are available in the intelephense section of settings.
Found a bug? Got a feature request? Create an issue.
A big thank you to supporters who have bought a premium licence and have enabled the continued development and maintenance of this extension.
Intelephense uses the following open source libraries. Please see the following links for source code and licences.
How To Set Up Visual Studio Code (VS Code) for PHP Development
Published on May 28, 2021
Introduction
Visual Studio Code, also known as VS Code, is a free source code editor — or integrated development environment (IDE) — available for all major operating systems.
With a large collection of extensions for many programming languages, VS Code can be customized to serve a wide variety of development needs. In this guide, you’ll learn how to set up Visual Studio Code for working on PHP projects.
Prerequisites
To follow this guide, you’ll need to download and install the appropriate version of Visual Studio Code for your operating system.
The instructions in this guide were validated on an Ubuntu 20.04 desktop computer, but they should work seamlessly in all operating systems that are supported by VS Code. Please note, though, that keyboard shortcut keys may need to be slightly modified for compatibility with MacOS systems.
Step 1 — Installing VS Code PHP Extensions for Extra Support
Right after installation, VS Code already recognizes PHP code and helps with syntax highlighting, basic debugging, and code indentation. These features are suitable for quick edits or when working with individual PHP scripts. Working in larger projects, though, can become difficult without more context around the code and how each file interacts and integrates within the larger project.
There are a number of VS Code extensions that can help speed up your productivity when working on PHP projects. In this guide, we’ll install and set up PHP Intelephense, a popular PHP extension for VS Code that provides several advanced features such as improved code completion, better navigation between components, rich information tooltips on mouse hover, code auto formatting, and real time error reporting based on static code analysis.
Once installation is complete, Intelephense’s official documentation recommends that you disable the built-in PHP Language Features extension that comes with VS Code.
To disable this extension, type @builtin php in the Extensions search box to locate the built-in PHP extensions. Then click on the settings icon for the PHP Language Features extension, and click the Disable option in the drop-down menu.
If you have any files open in VS Code, you’ll need to reload the editor to apply the changes.
You can install other extensions by following the same process described for the PHP Intelephense extension, but be aware that some extensions will require additional software to be installed on your system. Check the extension documentation to make sure you have requirements set appropriately.
Step 2 — Importing or Creating a New PHP Project
To import an existing PHP project into VS Code, click on the first icon on the left menu bar or type CTRL + SHIFT + E to access the file explorer. Click the Open Folder button and select your project’s directory. In case you are creating a new project, you can create a new folder and select that as your project directory.
The explorer window will now show the project’s directory tree, giving you quick access to files and directories on your project.
Step 3 — Customizing Theme and Editor Font (Optional)
Although not necessary, it is often a good idea to customize the appearance of your editor to make it more comfortable to use in the longer term. As a developer you may spend several hours every day looking at an IDE such as VS Code, and for that reason it’s important to make sure the editor font has an appropriate size, and the contrast is enough for good readability without tiring your eyes too quickly.
You may want to experiment with different themes and fonts in order to find a custom setup that works well for you.
Changing VS Code Theme
VS Code comes with a few different themes that allow you to change the colors used in the editor interface and in the code highlighting. Both dark and light styles are included by default.
You can also install theme extensions to further customize VS Code’s appearance. If you search for theme within the extensions tab ( CTRL + SHIFT + X ), you’ll find several theme extensions in different styles and colors, including color schemes ported from other popular editors and platforms.
Adjusting the Font
Although the default VS Code font settings will be good enough for many users, you may want to adjust the size and the type of the editor font for increased readability.
The changes are immediately saved and applied to all current open files.
Conclusion
Visual Studio Code is a lightweight yet powerful code editor that can be customized to suit the needs of most developers. In this guide, you learned how to install and configure the PHP Intelephense extension for extra support while working on PHP projects, how to import and create new projects within VS Code, and how to customize the editor appearance for a more comfortable coding experience.
For more tutorials on Visual Studio Code, check our VS Code tag page. If you’d like to learn more about PHP development, you can refer to our How To Code in PHP series for an introduction to the language, and our PHP tag page for more PHP tutorials.
Comparing other PHP intellisense extensions #128
Comments
eimajenthat commented Aug 28, 2018
I have been using VS Code for PHP development for some time now, and have been using Felix Becker’s PHP IntelliSense extension most of that time. Recently, I noticed that there are actually 3 fairly popular VS Code extensions for PHP intellisense (along with some less popular ones I’ve bypassed for expediency):
This raises several questions for me:
The text was updated successfully, but these errors were encountered:
We are unable to convert the task to an issue at this time. Please try again.
The issue was successfully created but we are unable to update the comment at this time.
bmewburn commented Aug 29, 2018
Thanks for your interest in this project.
Why create VScode when there’s Atom, Brackets etc? For me this is a pet project so I just continued with it even though the others came out first. The others didn’t give me the performance or feature set I needed at the time either.
I think they all aim to be the same thing, that is a PHP language server implementing the MS language server protocol. One major feature that this project has is support for js/html/css intellisense in php files. I’m not aware of any features in the others that are not covered in this project.
I don’t think there is anything to be gained by having all installed. They will all work if installed together because VScode generally makes a request to all registered providers and merges the response. Having more than one installed may cause duplicate suggestions; delays until the last server has sent a response; ‘smarter’ suggestions may get lost or lose significance if another server does not restrict the suggestions based on the context etc.
I suggest to try them one at a time and decide which is best for your use.
robclancy commented Aug 30, 2018
For the record the php-intellisense one has such bad performance it’s unusable on anything but a small project.
This one I can’t even type «class» without the autocomplete pissing me off (it stays suggested unless I press escape or enter. and if I press enter it deletes what I wrote to simply have «class» remaining).
eimajenthat commented Aug 30, 2018
Thanks for the info. I’m going to close this as I think my question has been answered. But if anyone else wants to comment, I’ll be happy read and learn from your comments.
robclancy commented Oct 2, 2018
Just for the record. The crane one was bad. I’m back to this one, but the issue remains where «class» keyword is apparently the only thing you can type unless you type the entire thing and put a < at the end.
jcklpe commented Oct 7, 2018
I’ve been wondering about this issue for awhile, so I’m glad to sorta get an answer. I haven’t tried crane yet but I think I might. I’m going to give Intelephense another shot though.
jcklpe commented Oct 7, 2018
Oh yeah, anyone have any suggested PHP formatters in vscode? I just started actively using beautifier on my html, scss, js etc and it’s been great! So I’m curious if there’s something similar for php. I’ve seen some stuff and I’m trying some but I’d love to hear people’s thoughts.
robclancy commented Oct 8, 2018
Crane barely even worked.
petitchevalroux commented Dec 19, 2018
@jcklpe I personnally use phpcbf as beautifier for php
jcklpe commented Dec 19, 2018
@petitchevalroux I found an extension for that. Do I have to install the phpcbf bin file in order for the extension to work?
petitchevalroux commented Jan 14, 2019
@petitchevalroux I found an extension for that. Do I have to install the phpcbf bin file in order for the extension to work?
Yes it’s easy to do with composer 😉
danmurf commented Feb 2, 2019
I’ve just switched from Intellisense to Intelephense and I’ve found the autocomplete much better (quicker and more accurate).
Pmakaasrul commented Feb 3, 2019
For me, i like Intelephense just because is autocomplete this->, and so much more. i really dont like typing this-> and many symbol that uses too much moving on my finger and shifting + keys
thanks for developing this plugin. i hope you keep improving it
robclancy commented Feb 4, 2019 •
if Intelephense wasn’t abandoned it would probably be a lot better than all other options by now. It seems to have a much better base. Wish I had time to fork and improve it. It affects our in-office efficiency so maybe I will be able to do it during work hours in the coming months.
EDIT: yeah I’m not going to do that. This guy has written an entire PHP 7 parser for this, which is a lot of code. Then his package to use that parser with the language server is also a lot of code. He did so much work for this package and then just stopped. It’s weird, maybe he just doesn’t have to use PHP anymore so doesn’t care?
IanVS commented Feb 7, 2019
@robclancy it sounds like the author has been working on it in a bit of a stealth mode, and a new version might be coming soon: #135 (comment)
dhonx commented Apr 14, 2019
For the record the php-intellisense one has such bad performance it’s unusable on anything but a small project.
This one I can’t even type «class» without the autocomplete pissing me off (it stays suggested unless I press escape or enter. and if I press enter it deletes what I wrote to simply have «class» remaining).
Yeah.. you’re right bro,,i dont check the performance on the developer tools, but php-intellisense its very lack on my computer.
robclancy commented Apr 14, 2019
The performance was improved since my comment. But still has a lot of memory usage and last I tried it didn’t even work with workspaces.
masoumii commented Apr 25, 2019
PHP Intellisense is a mess, I use Intelephense for VS code and it works great.
ice6 commented Jul 25, 2019
It is so smart, even smarter than PHPStorm.
khanks commented Sep 13, 2019
I hope the author or someone else continues on Intelephense. I’m not qualified or else I would do it.
dhonx commented Sep 14, 2019
@danmurf same as me. it much better
tehjrow commented Dec 3, 2019
Just adding my thoughts there. Intellisense is unusable over VSCode remote ssh, it’s just too slow. Intelephense works perfectly.
stracker-phil commented Jul 21, 2020
I had major performance issues on my computer for the past weeks. Tried to uninstall apps, browser extensions, close unused tabs, etc until I noticed that PHP IntelliSense hogged my CPU to the point of stalling the music and lags in the mouse movement.
Have switched to Intelephense and working feels like a breeze again 🙂 Just purchased the Pro license for the extra features. Honestly, this extension is 100 times faster than PHP IntelliSense, and supporting it with a license is the least I want to do to say THANK YOU for solving my performance problems! 👍 🚀
mathmul commented Oct 29, 2020
Been using PHP IntelliSense for a long time and being a bit dissatisfied with it. After starting with a big project, I finally started searching for other solutions. I found Intelephense and loved it. After a week of usage I bought it and never looked back since. Thank you!
Visual Studio Code PHP Intelephense Keep Showing Not Necessary Error
After the latest update of PHP Intelephense that I get today, the intelephense keep showing an error for an undefined symbol for my route (and other class too), there is no error like this before and it’s bothering me.
Here is the error screenshot :
And this is my code :
Actually there’s no error in this code but the intelephense keeps showing an error so is there a way to fix this?
17 Answers 17
Intelephense 1.3 added undefined type, function, constant, class constant, method, and property diagnostics, where previously in 1.2 there was only undefined variable diagnostics.
Some frameworks are written in a way that provide convenient shortcuts for the user but make it difficult for static analysis engines to discover symbols that are available at runtime.
Stub generators like https://github.com/barryvdh/laravel-ide-helper help fill the gap here and using this with Laravel will take care of many of the false diagnostics by providing concrete definitions of symbols that can be easily discovered.
Still, PHP is a very flexible language and there may be other instances of false undefined symbols depending on how code is written. For this reason, since 1.3.3, intelephense has config options to enable/disable each category of undefined symbol to suit the workspace and coding style.