How to run PHP in Visual Studio Code on Windows 10/11 [2024 Update] PHP Developers

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everyone I welcome you all to gy script  today in this video I'm going to show you how   to run PHP programs within our Visual Studio code  so I'm going to also write a simple hello world   PHP program and I'll show you how to run that  within Visual Studio code so this video going   to be a bit informative so I am going to request  you to watch the video till the end and I can   guarantee that you'll be learning a lot of new  things and if you face any issues in Middle you   can always put a comment in your comment sections  I'll try my best to help you so now to run PHP on   Visual Studio code you will basically need two  things right one is PHP another will be Visual   Studio code itself so let's go to our browser  and just simply type over here PHP download and   hit enter and you'll you'll be able to see this  download link so you need to open that and this   link I'm going to put right in your description  so you can directly use that link to land over to   this site and here you can see that our latest  version of PHP P version PHP version 8.3.1 so   here you need to just simp click on this uh  uh Windows download as I'm installing it for   our windows and here you can see we have this  non thread save option and another we have is   a thread save option so this is the one that I'm  going to download this ZIP file and here you can   see it is rightly started downloading our PHP so  once we have PHP next thing that you will need is   Visual Studio code itself so just simply type  visual ual Studio code and you can just simply   you know proceed to download our Visual Studio  code again this link I'm going to put right in   our description and uh our Visual Studio code is  also start started downloading I have both these   two software so I'll minimize our browser I'll go  to my download directory and here you can see that   we have our Visual Studio code and PHP so let's  install our Visual Studio code first and this   is our license agreement you need to just simply  accept the license agreement and proceed so click   on next over here again next and here I'm going to  select all these options right and click on next   and then install and it going to start installing  our Visual Studio code right so by the time it get   installed what I'm going to do is I'm going to  extract our PHP so just simply right click and   click on extract all and extract so it's going  to start extracting our PHP over here and you   can see that our PHP is rightly extracted raed  so let's close this so this is where our PHP is   extracted so what I'm going to do is I'm going  to rename this folder and I'm going to rename   this and I'm going to keep only till version PHP  8.3.1 right so I'm going to basically sorten the   path and then I'm going to just simply cut the  folder and I'm going to past that within our C drive so here you can see that that in our C drive  we have now PHP uh uh 8.3.1 uh you know folder is   rightly pasted over here it contains all the files  so now what you need to do is you need to click on   this address bar then right click and copy this  you know folder path and then you need to click   on this search and need to type over here Environ  so that will open the edit system environment   variables window so you need to open that and  here you need to click on environment variables   and you'll be able to see this window so here you  need to click on path and then edit and then you   need to click on new then right click and paste  that PHP folder path over here now click on okay   then again okay and then again okay and now if you  just simply minimize your your download directory   you'll be able to see our desktop basically so  here also you can see that our Visual Studio is   rightly you know installed now so launch Visual  Studio is also selected click on finish to start   launching our Visual Studio code and you can  see that our Visual Studio code is directly   launched over here now before I show anything  on Visual Studio code let's first verify our   PHP got installed successfully or not so for that  just simply go to search and type CMD to open our   Command Prompt and uh in our Command Prompt let's  just simply type PHP space- Dash version and hit   enter and you can see that our PHP version 8.3.1  is rightly shown over here so if you see this   similar type of prompt then all that basically  mean is our PHP is rightly installed right so once   you have PHP directly installed you can you know  uh go to our Visual Studio code itself and you   can close the welcome note for now so now what you  need to do is you need to click on this Explorer   and click on open folder so what we are going to  do now is we are going to create a new folder and   we are going to name that folder as PHP program  so I'll give PHP prog I'll go inside that PHP prog   I'll select the folder and our folder is slightly  selected over here yes I TR the authors so our PHP   proc folder is slightly selected over here so we  need to click on this plus icon to create a new   file so let's give the file name as again prog do  PHP all right so why PHP because we are writing   in it PHP so we we need to give one extension PHP  so we can see our pr. PHP file is rightly opened   over here all right so now you need to go to this  extensions and you need to type over here PHP all   right so here let's select this PHP intell fense  and I can see uh we have a documentation over here   so here if you see it is telling we need to search  this adate buil-in PHP and we need to disable that   right so we are copying this and we are search SE  it over here and you can see we have our default   vs uh code you know language feure so we need  to disable that right and it's telling we need   to reload so let's reload so our successfully  reloaded and now again remove this and type PHP   to install our PHP intense so just simply hit  install and it's going to start installing our   this extension can see it is rightly installed so  you know let's click on open over here click on open and you can see that their official site is  rightly open over here so you can you know read   more about them and you can also donate if you if  you want I'll minimize this so after installing   PHP intense you need to install code Runner also  so just simply type Runner over here and you'll   be able to see code Runner is our first option  so so this is what you need to install so you   can see you know all this language it supports  so it is properly installed now now let's go   back to our you know uh pr. PHP so here I'm going  to open angular bracket then PHP and I'm going to   end you know our tag and here I'm going to just  simply go hello world over here all right hello   world and you can see it is in properly giving us  our intelligent support so let's save the program   and once you have code Runner install you'll  be able to see a run button over here so that   is what you need to click and you can clearly  see the output is properly coming right hello   world over here so this way install PHP on Windows  operating system and use our Visual Studio code to   run any PHP program I have also started geeky  syntax channel so here I'm regularly posting   coding related videos so please do subscribe this  channel as well that would really motivate me to   make more videos and also I have started a geek  scrip vlogging channel so this also if you're   interested you can also subscribe this channel  as well so that's basically all about this video   please do let me know in your comment sections  whether these videos are helping you so that's   all for this video friends thank you very much  for watching this video and God bless you all
Info
Channel: Geeky Script
Views: 7,243
Rating: undefined out of 5
Keywords: visual studio code, vs code, vscode, visual studio code tutorial, visual studio code extensions, visual studio code html, how to run php files in vs code, php tutorial, php, php 2024, Visual Studio Code, run php, run php program on VS Code, run php on Visual Studio Code, run php program, run first php program, php visual studio, How to Run PHP Using Visual Studio Code, how to run php using visual studio code 2024, run php in visual studio code, php tutorial with vscode
Id: Mip_RuSEoso
Channel Id: undefined
Length: 8min 21sec (501 seconds)
Published: Mon Jan 15 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.