tutorial#
Know what PHP objects are doing behind your back
The objects sometimes misbehave. You watch them closely when your are debugging and they behave as they should - they know you are watching. You are stepping through the code, sinking deeper into the methods. When you surface back and see your old objects again, they are different, their properties have changed. Something happened to them behind your back.
Compound Launch and Debug in VS Code
Very often a PHP project consists of several separately hosted applications, such as a public website and some API. In case developer wants to run and debug his set of applications locally, there is a very useful feature in VS Code called compound launch.
New Project Wizards
Working on a PHP project in Visual Studio may start in two ways; either opening a folder (File
| Open
| Folder
), or creating a regular Visual Studio project (File
| New
| Project
). Although both approaches work, we're recommending the seconds option, since it provides much more features and the full blown Visual Studio experience. Let's take a look on the New Project Wizards.
Installing and configuring XAMPP for PHP development
XAMPP is a cross-platform Apache HTTP server distribution containing MariaDB (fork of MySQL) database, PHP, and Perl. The word "XAMPP" is an acronym and it seems there is no official explaning of if, but we can safely assume that "X" stands for "cross", meaning "cross-platform", A would be Apache, M is MariaDB. While first P would be short for PHP and second P for Pearl or reversed?
Laravel on WSL and VS Code
Visual Studio Code and Windows Subsystem for Linux (WSL): those represent a great couple for developing a PHP application such as Laravel inside a virtual Linux environment. This tutorial describes installation of WSL (version 2) on Windows 10, setting up PHP with debugging capabilities in there, creating a Laravel project, and getting your VS Code ready to debug the PHP project in WSL.
How to setup IIS for PHP Development with PHP Tools for Visual Studio
When IIS Express isn’t sufficient for your development needs and you need to get an full-fledged IIS web server for your PHP project, you can now configure it in matter of few clicks.
Installing PHP 8, One Click
Even tho PHP 8 was officially released on November 26, 2020, you could already use its new syntax with PHP Tools before that date, and install PHP from sources. Now the release is available for the Windows platform and it can be installed on your development machine in an easy way.
Debugging PHP in Visual Studio Code
If you read our Award Winning article (well, my Mom liked it) about how to use PHP Tools with Visual Studio, you'll understand that we didn't want to make the good people who enjoy using Visual Studio Code with PHP Tools left out, so we want to demonstrate how to debug your code on that platform.