Live data from Hacker News

Peachpie – Open Source PHP Compiler to .NET and WordPress under ASP.NET Core

hanselman.com

11–20 of 36 posts

Re: Peachpie – Open Source PHP Compiler to .NET and WordPress under ASP.NET Core

#11
post #8

I'm trying to find a use case for this. A .NET to php decompiler may be more useful at this point in time.

To me it seems similar to running Ruby on the JVM (JRuby). Perhaps you like php but have a lot of .net code to interop with. I bet writing business logic in C# and web tier code in php could possibly be a satisfying experience.

Re: Peachpie – Open Source PHP Compiler to .NET and WordPress under ASP.NET Core

#12
post #4
post #3

This 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.

We have a huge PHP codebase we may be interested to bring into the .NET world. I have looked at Peachpie but I wonder how well it works in the real world and what the long term prospects are. 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..

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.

Re: Peachpie – Open Source PHP Compiler to .NET and WordPress under ASP.NET Core

#13
post #10
post #6

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.

My point was that WordPress is a large codebase and exercises a fair amount of php syntax and built-ins.

Re: Peachpie – Open Source PHP Compiler to .NET and WordPress under ASP.NET Core

#14
post #4

Earlier quoted context omitted.

We have a huge PHP codebase we may be interested to bring into the .NET world. I have looked at Peachpie but I wonder how well it works in the real world and what the long term prospects are. 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..

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?

Re: Peachpie – Open Source PHP Compiler to .NET and WordPress under ASP.NET Core

#15
post #4

Earlier quoted context omitted.

We have a huge PHP codebase we may be interested to bring into the .NET world. I have looked at Peachpie but I wonder how well it works in the real world and what the long term prospects are. 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..

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.

What PHP version is Peachpie targeting?

Re: Peachpie – Open Source PHP Compiler to .NET and WordPress under ASP.NET Core

#16
post #6
post #4

Earlier quoted context omitted.

We have a huge PHP codebase we may be interested to bring into the .NET world. I have looked at Peachpie but I wonder how well it works in the real world and what the long term prospects are. 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..

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.

'Sort of running' and stable enough to deploy into production are different things. I really want this to work but I am a little nervous about committing to it.

Re: Peachpie – Open Source PHP Compiler to .NET and WordPress under ASP.NET Core

#17
post #5
post #3

This 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…

The classic example of this would be that, before PHP 7, Zend spent a lot of effort trying to make PHP use JIT. It improved the results on microbenchmarks a lot, but made negligible difference to real-world code, IIRC.

Re: Peachpie – Open Source PHP Compiler to .NET and WordPress under ASP.NET Core

#18

This has nothing to do directly with this blog post, but just wanted to say that Scott Hanselman is probably the best that could have happened to .NET of all things. Better than Linq and async/await together. He's an amazing speaker and his blog is a great resource for everything around .NET. Can highly recommend to watch and follow this guy!

He also comes across as very humble on his Hanselminutes podcast. Great guy.

Re: Peachpie – Open Source PHP Compiler to .NET and WordPress under ASP.NET Core

#19
post #15

Earlier 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.

What PHP version is Peachpie targeting?

From this:

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...

Re: Peachpie – Open Source PHP Compiler to .NET and WordPress under ASP.NET Core

#20

This has nothing to do directly with this blog post, but just wanted to say that Scott Hanselman is probably the best that could have happened to .NET of all things. Better than Linq and async/await together. He's an amazing speaker and his blog is a great resource for everything around .NET. Can highly recommend to watch and follow this guy!

Agreed. He and Scott Guthrie used to make an amazing 1-2 punch when they were both working in the ASP.NET area of Microsoft.
Post reply on HN