Peachpie – Open Source PHP Compiler to .NET and WordPress under ASP.NET Core
hanselman.com
hanselman.com
Has anybody used it? The PHP code is full of questionable code which somehow works in PHP but I am not sure if it's possible to map PHP's behavior into .NET..
Error handling is a big issue - in PHP every notice and warning can be handled in user code, in .NET we use Debug Assertions or exceptions. But .NET has threads and async which shares one thread by more requests, so in case of error we just don't know what request has to handle the error. We would have to pass some request context object to every function in runtime in order to be able to let the correct request's error_handler to handle the error - or we just assume warnings and errors should not happen and crash when it does.
Garbage Collection - for performance reasons (and sanity) we let .NET GC to do its job. But unlike PHP's GC it is undeterministic and does its job on a different thread. For now, __destruct is not handled in Peachpie yet cause there are more ways on how to simulate PHPs behavior.
Changing existing closure's $this to anything - well.. besides it would make type analysis useless, it totaly violates strong .NET method access checks.
https://github.com/peachpiecompiler/peachpie/wiki/Peachpie-R...
Looks like PHP 5.4 and 7.1 roadmap goals have been achieved.
Though http://www.peachpie.io/about references Phalanger as the inspiration which apparently got as far as PHP 5.6.
There's also compatibility page that looks useful:
https://github.com/peachpiecompiler/peachpie/wiki/Compatibil...
Be careful with microbenchmarks. From my experience, there tends to be very little correlation between performance improvements on microbenchmarks and real applications. If you improve performance on the microbench suite by a factor of two, you definitely will not get a factor of two on real applications -- more likely, it will be something like 2%.
Basically, if the benchmark is not testing end-to-end performance on Wordpress (or similar), then it's a useless benchmark.
Most recent HN discussion dug into the tech and also the rationale behind transitioning in either direction: https://news.ycombinator.com/item?id=13753445 (404 points/164 comments/Feb 2017)
Now that asp.net is end of life, these sad people are looking for ways to migrate their aging asp and asp.net code base to elsewhere. The only supported option is the incompatible new asp.net core on dotNet core - out of the jungle into the jungle.
Even Silverlight is not officially dead until 2021 so I'm not sure I'm clear on your terminology (vs. https://support.microsoft.com/help/17455 ).
Just for fun I dug up the "Mainstream Support End Date" for ASP.NET on .NET 4.5.2: 10/9/2018.
--
Starting from https://www.asp.net/support
Many parts of ASP.NET are a part of the Microsoft .NET Framework, these include ASP.NET Web Forms, Controls, Modules, Handlers and more. For more information see .NET Platform Support.
Then at https://www.microsoft.com/net/support
The Support Lifecycle information for all versions of .NET Framework can be seen on the Microsoft Product Lifecycle site.
Then at https://support.microsoft.com/en-us/lifecycle/search?alpha=....
For more information, please visit the .NET Framework Support Lifecycle Policy FAQ.
Then at https://support.microsoft.com/help/17455
Support for .NET 4.5.2 follows the lifecycle policy of the parent operating system. It is supported as a Windows component on the latest required operating system update for Windows Vista SP2, Windows 7 SP1, Windows Server 2008 SP2, Windows Server 2008 R2 SP1, Windows 8.1 Update, Windows Server 2012, and Windows Server 2012 R2.
Then at https://support.microsoft.com/en-us/lifecycle/search?alpha=W...
Products Released: Windows Server 2012 R2 Standard
Lifecycle Start Date: 11/25/2013
Mainstream Support End Date: 10/9/2018
Extended Support End Date: 10/10/2023
Service Pack Support End Date: [empty]
Notes: Mainstream and Extended support for this product has been extended to provide customers with the standard lifecycle transition timeline. For up to 6 years of additional support beyond Extended Support, please see the Premium Assurance website.
[disclaimer: Microsoft employee, .NET Foundation staff]
It would be helpful if you can provide some source for this.