1

Install PeachPie Visual Studio Extension

The extension adds project templates into your Visual Studio that makes it easy to start building your PeachPie powered web, library or application.

PeachPie Visual Studio Extension

Grab the official extension from Visual Studio’s Marketplace or install it directly from your Visual Studio.

Get the extension

2

Create a new project

We have prepared common project templates for the most used scenarios.

  • Go to File | New | Project
  • Navigate to the PHP (PeachPie) project templates and choose the one you want to get started with

Visual Studio creates and loads the newly created project. It needs an Internet connection to download the project dependencies for the first time and then you’re ready to go.

3

Debug Your Program

Now build your project and run it with F5!

That’s It

You’ve just created a .NET project in PHP! Discover other possibilities and use cases with PHP on .NET, or migrate an existing PHP library to the .NET platform.

1

Install .NET Core SDK

.NET Core builds and empowers your application. It is a universal, cross-platform and secure environment for your code.

2

Install Peachpie .NET Templates

We have prepared common project types for you to get started. They hide all the complexity of project files and come with code samples.

dotnet new -i Peachpie.Templates::*

3

Create Website

Now create the project. The command creates all the files required by the initial solution. Website directory will contain the root of your PHP web site.

Continue by editing the newly created Website/index.php file.

dotnet new web -lang PHP

4

Run Your Project

Navigate to the Server directory. This is the entry point of the web application, working as a bootstrapper for your PHP website.

The commands restore all dependencies, compile the project and start the web server.

cd Server
dotnet run

Test Your WebSite

Open your favorite web browser and enter the URL.

http://localhost:5004

1

Install .NET Core SDK

.NET Core builds and empowers your application. It is a universal, cross-platform and secure environment for your code.

2

Install Peachpie .NET Templates

We have prepared common project types for you to get started. They hide all the complexity of project files and come with code samples.

dotnet new -i Peachpie.Templates::*

3

Create Some Code

The following command creates the project and a sample script .php file.

dotnet new console -lang PHP

4

Run Your Program

Restore packages, compile your code and run with the following commands.

dotnet run

That’s It

You’ve just created a .NET executable program in PHP! Discover other possibilities and use cases with PHP on .NET, or migrate an existing PHP library to the .NET platform.