PeachPie

from Wikipedia, the free encyclopedia
PeachPie

Peachpie-logo.png
Basic data

Maintainer iolevel
developer iolevel
Publishing year 2016
Current  version 0.9.42
operating system CLR
programming language C #
category Compiler
License Apache license (Apache 2)
German speaking No
https://www.peachpie.io

PeachPie is an open-source - compiler and runtime -Ersatz the PHP programming language for .NET and .NET Core . The project builds on Microsoft's Roslyn Platform and is based on the Phalanger project, which was also developed at Charles University . PeachPie compiles PHP source code into CIL bytecode and also uses the JIT compiler component of the .NET Framework to enable additional optimizations and to handle the beginning of the compilation process. The purpose of PeachPie is not to generate or optimize native source code, but to translate PHP scripts into an applicable CIL code that also contains metadata. In July 2017, the PeachPie project became a member of the .NET Foundation .

development

PeachPie's architecture is based on the Phalanger project, which also originated in Charles University in Prague . PeachPie was built on Microsoft's Roslyn compiler platform and uses Roslyn's API. The Czech software development company iolevel has been developing the project since 2016.

Compared to Phalanger, PeachPie has numerous advantages, both due to Roslyn's API and due to the new architecture of the compiler. Phalanger could run only on the .NET Framework, which on Windows - the operating system can be executed. Platform independence could only be made possible with Mono . In contrast, PeachPie also enables the use of the .NET Core Framework, which is platform-independent by default. PeachPie is also more powerful than Phalanger. The PeachPie compiler contains advanced semantic analysis that generates symbols similar to C # , and accordingly enables two-way interoperability between PHP and .NET.

PeachPie shows some similarities to Facebook's HHVM compiler, which runs PHP on a specially created virtual machine . However, in late 2017, Facebook announced that version 3.24 of HHVM would be the last one compatible with PHP, as the project would only focus on Facebook's own PHP extension, Hack, in the years to come.

The PeachPie project is supported by Microsoft. The two authors, Jakub Míšek and Benjamin Fistein , appeared several times on the virtual .NET Conf, the On .NET Livestream, and the .NET Rock Podcast. PeachPie has been a member of the .NET Foundation since July 2017. In December 2018, iolevel received the European Union's Horizon2020 grant to continue and expand its work on the PeachPie project.

aims

The project has several goals:

  • Speed : Since the PHP source code is translated into CIL and only then executed, this should lead to significant improvements in execution performance. Initial comparisons suggest that execution is faster than with pure PHP code. The independent TechEmpower Plaintext Benchmark also showed that WordPress on PeachPie could process 305,612 requests per second, compared to PHP, which could process 45,616 requests per second. PeachPie is regularly measured within the TechEmpower Benchmarking Rounds, where the project is faster than other PHP frameworks. Phalanger already showed significant performance improvements compared to PHP 5.4.
  • Interoperability: PeachPie allows users to combine PHP and .NET languages. This enables unusual applications like inserting C # lambdas into a PHP context or inheriting PHP classes in C #. Users can also use PHP components within .NET projects and vice versa.
  • Additional security : Since PeachPie compiles the source code into a DLL file, applications can be distributed without the original source code. PeachPie makes it possible to convert complete PHP applications and frameworks into .NET DLL files and thus offer them in NuGet format, for example .
  • Cross-Platform : PeachPie can run on the .NET Core platform, so PHP applications can be run on Windows , MacOS and Linux .

Supported Applications

As of 2019, WordPress , CodeIgniter and MediaWiki , the software on which Wikipedia runs, are officially supported.

swell

  1. .NET Foundation. Retrieved May 28, 2019 .
  2. phpcompiler: Phalanger: PHP .NET compiler revealed (1/2). May 4, 2011, accessed May 28, 2019 .
  3. .NET Core Framework - Go Cross-Platform with the .NET Framework. Retrieved May 28, 2019 .
  4. Phalanger's PHP on Mono / .NET Updates - Miguel de Icaza. Retrieved May 28, 2019 .
  5. Paul Krill: Forget PHP! Facebook's HHVM engine switches to Hack instead. September 20, 2017, accessed May 28, 2019 .
  6. Microsoft Visual Studio: Running PHP on .NET Core with Peachpie. September 20, 2017. Retrieved May 28, 2019 .
  7. Code Mantisa: S303 - Advanced C # PHP interoperability with PeachPie by Jakub Misek. September 18, 2018, accessed May 28, 2019 .
  8. Benjamin Fistein & Jakub Míšek - Peachpie PHP compiler for .NET. Retrieved May 28, 2019 .
  9. Peachpie. Retrieved May 28, 2019 .
  10. .NET Rocks! vNext. Retrieved May 28, 2019 .
  11. European Innovation Council SME Instrument. Retrieved June 13, 2019 .
  12. Serdar Yegulalp: Peachpie compiler aims to bring PHP to .Net. March 14, 2016, accessed May 28, 2019 .
  13. Peachpie: Use Wordpress on .NET via PHP compiler. In : entwickler.de. September 4, 2017, accessed on May 28, 2019 (German).
  14. TechEmpower Web Framework Performance Comparison. Retrieved May 28, 2019 .
  15. Ben Adams: Contribute to benaadams / PeachpieBenchmarks development by creating an account on GitHub. May 27, 2019, accessed May 28, 2019 .
  16. Ben Adams: Peachpie running PHP on .NET Core and # aspnetcore's Kestrel is pretty impressive at 452,179 requests per second! Especially looking at the top ten PHPs https://www.techempower.com/benchmarks/#section=test&runid=aad43f39-48a2-460c-a363-99cd543a772a&hw=ph&test=plaintext&l=hr9zpb… pic.twitter.com / XFK3ydJlN6. In: @ben_a_adams. June 3, 2018, accessed May 28, 2019 .
  17. ^ Phalanger: Stuffing PHP With Mono, .NET - Phoronix. Retrieved May 28, 2019 .
  18. Running PHP Applications on .NET Core - DZone Web Dev.Retrieved May 28, 2019 .
  19. ^ Scott Hanselman: The whole of WordPress compiled to .NET Core and a NuGet Package with PeachPie. Retrieved May 28, 2019 .
  20. richlander: .NET Core Guide. Retrieved May 28, 2019 (American English).
  21. Scott Hanselman: Peachpie - Open Source PHP Compiler to .NET and WordPress under ASP.NET Core. Retrieved May 28, 2019 .
  22. Setting up MediaWiki on .NET with Peachpie @ PeachPie | PHP compiler to .NET. Retrieved May 28, 2019 .