PHP unit testing on .NET, naturally

Posted on November 19, 2020, in category Information, Tutorial, tags: , , , ,

Testing is an essential part of software development. On .NET, we are used to the certain comfort and simplicity of managing our tests, running them, debugging them, collecting reports, profiling, and keeping track of the code coverage, within a single click. Does this work with PHP on .NET as well?

... continue reading

Targeting a library for both PHP and .NET

Posted on November 14, 2020, in category Information, Tutorial, tags: , , , ,

There is a massive amount of libraries and frameworks written in PHP, providing useful functionalities, some even commercially. You may have come across libraries, such as PDF generators, the Twig templating engine, random data generators, etc. Let’s take a look at how to develop the library for both PHP and .NET, so that C# developers […]

... continue reading

Creating an Executable Console Application in PHP

Posted on March 15, 2020, in category Tutorial, tags: , , , ,

There are a few tools out there that allow you to create an executable console application in PHP, but they tend to be a little heavy and limited to a certain OS. With PeachPie, console apps can be created straightforwardly, without having to distribute the sources, and it can be debugged right in Visual Studio.

... continue reading

Debugging PHP eval() in Visual Studio

Posted on March 4, 2020, in category Information, Tutorial, tags: , , , , , ,

Evil eval() is back for a third edition – this time we’ll take a look at it from a more user-friendly perspective: debugging in Visual Studio.

... continue reading

Build Configuration in Visual Studio

Posted on February 23, 2020, in category Information, Tutorial, tags: , , , , ,

All projects targeting the .NET platform have build properties, build events, and many other options we commonly define. This post depicts the well known project property pages in Visual Studio, which are also implicitly available to PeachPie projects.

... continue reading

Twig In Razor

Posted on January 18, 2020, in category Announcement, Information, Samples, Tutorial, tags: , , , ,

Whenever you are building a website, you choose how to design your front-end. Different platforms each offer their own ways; in PHP, the selection of options is by far the most extensive.

... continue reading

How to diagnose PHP code

Posted on January 12, 2020, in category Information, Tutorial, tags: , , , ,

In this article you will find out how to pinpoint all the potential issues in regular PHP code by taking advantage of fast compiler-based static program analysis, provided as a part of the PeachPie project.

... continue reading

The ultimate guide to migrating a PHP project to .NET with PeachPie

Posted on December 1, 2019, in category Information, Tutorial, tags: , , , , , , , ,

PHP is an incredibly rich ecosystem, but with the growing popularity of .NET Core, you may want to combine these two worlds. Let’s take a look at how we migrate a PHP project to .NET with the help of VS Code and PeachPie.

... continue reading

Self-contained PHP app

Posted on June 17, 2019, in category Samples, Tutorial, tags: , , , , ,

PHP programs usually need a runtime installed on your target machine, appropriate version of PHP itself, a web server and some sort of configuration. This is no longer needed when you are compiling PHP code into .NET. The PHP web or console program can be distributed as a self-contained executable with no such dependencies.

... continue reading

Using C# in PHP and Vice Versa

Posted on February 5, 2019, in category Information, Tutorial, tags: , , ,

Interoperability is one of the most valuable use cases of PeachPie: using C# (.NET) classes, interfaces and methods right in PHP code and vice versa. Let’s take a look at individual cases and how to achieve interop with PeachPie.

... continue reading