Earlier quoted context omitted.
They did get WordPress at least sort of running on it. That wasn't possible with the first releases of hhvm, so it says something.
It's says they actually get WordPress running before releasing it. Not that I want to undermine project achievements, but WordPress likely going to work even on PHP 5.2.x that almost 10 years old.
Peachpie – Open Source PHP Compiler to .NET and WordPress under ASP.NET Core
31–36 of 36 posts
Re: Peachpie – Open Source PHP Compiler to .NET and WordPress under ASP.NET Core
#32This is really about Peachpie, an open source PHP to .NET compiler. (Edit: the title has now been updated) From the comments on the article, here's a set of benchmarks showing Peachpie with a significant performance advantage over PHP 7 in a number of benchmarks: http://www.peachpie.io/benchmarks . That said, it's still hard to get excited about PHP.
Disclaimer: PHP core dev. 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…
Re: Peachpie – Open Source PHP Compiler to .NET and WordPress under ASP.NET Core
#33Earlier quoted context omitted.
It's says they actually get WordPress running before releasing it. Not that I want to undermine project achievements, but WordPress likely going to work even on PHP 5.2.x that almost 10 years old.
5.2.x is old, but that doesn't mean it's simple or easier to implement.
Re: Peachpie – Open Source PHP Compiler to .NET and WordPress under ASP.NET Core
#34Earlier quoted context omitted.
Disclaimer - Peachpie dev. Some of the weird PHP constructs will never work - by purpose. In such case it will be reported in compile-time or at least in run-time. However, there is always a way of slightly changing the original code to make it running on .NET.
Do you happen to have any examples?
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.
Re: Peachpie – Open Source PHP Compiler to .NET and WordPress under ASP.NET Core
#35Earlier quoted context omitted.
Do you happen to have any examples?
For example one CLR limitation - `yield` cannot be in a catch block. Two workarounds - compiler can generate a crazy state machine or user can just move the PHP yield outside the catch. 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 w…
Re: Peachpie – Open Source PHP Compiler to .NET and WordPress under ASP.NET Core
#36Earlier quoted context omitted.
For example one CLR limitation - `yield` cannot be in a catch block. Two workarounds - compiler can generate a crazy state machine or user can just move the PHP yield outside the catch. 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 w…
__destruct is not called when the reference count goes to 0? This is one of the (few) features I think PHP does better than C#.