Live data from Hacker News

HipHop VM: now at 98.5% PHP framework parity, 16% faster

hhvm.com

21–30 of 112 posts

Re: HipHop VM: now at 98.5% PHP framework parity, 16% faster

#21
Does anyone have an easy method of testing HHVM on your website?

I was thinking of recording the production requests for x amount of time and replaying them on HHVM so you could see if responses are identical, there are no crashes, state of the database is same afterwards, etc.?

Re: HipHop VM: now at 98.5% PHP framework parity, 16% faster

#22

Does anyone have an easy method of testing HHVM on your website? I was thinking of recording the production requests for x amount of time and replaying them on HHVM so you could see if responses are identical, there are no crashes, state of the database is same afterwards, etc.?

A good test suite? ;)

Seriously though, I decided that if I had a project that was difficult to test, that I knew had hairy code that used some funky features it was best to just stick to APC. All my new projects are being built on HHVM directly with test suites as I go.

Edit; that was a while back now, though. What frameworks and libraries are you using? Run their test suites through HHVM and if they all pass, you'll be fine. Facebook use it themselves now apparently.

Re: HipHop VM: now at 98.5% PHP framework parity, 16% faster

#23
post #7

With the recent discussion on the origins of PHP function names, and about what, if anything, can be done to fix PHP without ruining it...I'm curious about what happens at Facebook. Besides HipHop, do they maintain a strict PHP style among their developers? Even if HipHop can handle all of PHPs variations, I imagine there's time saved by writing optimally-designed (for the human) code, too?

For core language features like that, there really is no way to "fix" it. Just pick a better language.

Poor choice of function names are the easiest of problems to fix. Write an internal base framework that you use and strongly discourage the use of functions outside of it. Even if the new set of APIs are as simple as just forwarding the call to the standard PHP one with reversed arguments, using one example people complain about all the time. This isn't hard to do, doesn't require a lot of upfront work (add APIs as you go) on a new project, and won't give you too much (if any) of a performance hit. You don't need to burn the house down because you don't like how the furniture is arranged.

Re: HipHop VM: now at 98.5% PHP framework parity, 16% faster

#24

Earlier quoted context omitted.

For core language features like that, there really is no way to "fix" it. Just pick a better language.

Poor choice of function names are the easiest of problems to fix. Write an internal base framework that you use and strongly discourage the use of functions outside of it. Even if the new set of APIs are as simple as just forwarding the call to the standard PHP one with reversed arguments, using one example people complain about all the time. This isn't hard to do, doesn't require a lot of upfront work (add APIs as y…

PHP has so many more problems than that, though. I don't think it's worth the effort. It'd be like replacing the rotting floorboards of a house that has mold spores in every corner and a caved-in roof.

Re: HipHop VM: now at 98.5% PHP framework parity, 16% faster

#27

I wonder how hard it would be (for me) to take php and change all function names to be consistent. All PascalCase and spelled out (no awful abbreviations). Then download the documentation and change it there as well.

First you'd have to make sure your string hash function isn't strlen.

Re: HipHop VM: now at 98.5% PHP framework parity, 16% faster

#28
post #17

I see a lot of familiar frameworks and CMSs except one. Wordpress. Any idea why Drupal and Joomla would be listed without WordPress?

Wordpress' unit test suite was just too gnarly to get running with our test harness. Send us a pull request if you can get it working.

https://github.com/facebook/hhvm/blob/master/hphp/test/frame...

Re: HipHop VM: now at 98.5% PHP framework parity, 16% faster

#29
post #17

I see a lot of familiar frameworks and CMSs except one. Wordpress. Any idea why Drupal and Joomla would be listed without WordPress?

They mention the compatibility of the projects unit tests with their own testing so perhaps WordPress has some things in their test setup that didn't fit. They mentioned CakePHP as another example that wasn't included.

Re: HipHop VM: now at 98.5% PHP framework parity, 16% faster

#30

I wonder how hard it would be (for me) to take php and change all function names to be consistent. All PascalCase and spelled out (no awful abbreviations). Then download the documentation and change it there as well.

First you'd have to make sure your string hash function isn't strlen.

[deleted]
Post reply on HN