Live data from Hacker News

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

hhvm.com

101–110 of 112 posts

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

#101
post #95

Earlier quoted context omitted.

Yeah, Laravel is pretty much the modern framework for people who can't divorce themselves from CodeIgniter.

What does Laravel do that other frameworks like FuelPHP and Yii don't do? I hear a lot about it but don't hear a lot about why it's so much better than others.

On the surface most of the popular PHP frameworks are not much different from each other. Basic MVC separation, some sort of dependency injection container (actually a service locator), Composer and standardized autoloading, etc. Once you dig into the coding aesthetics then the differences start to become clear. Yii isn't PSR compliant, both FuelPHP and Laravel make liberal use of Facades and/or __callStatic to preserve the style of static function calls that are prevalent in CodeIgniter. I guess what makes Laravel stand out is the sheer amount of documentation and examples that are available, both on the website and in the code itself. This makes it really easy to get started.

Me, I'm not really keen on the Component::function() syntax. Feels like a crutch to me. Especially when people go out of their way to avoid specifying namespaces by abusing class_alias. Plus you're not really saving that many keystrokes compared to, say, $this->app['component']->function(). (Yes, I like Silex).

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

#102
post #74

Other than Facebook, does anybody have HipHop running in production? Any big caveats?

Other than Facebook, does anybody need HipHop?

You're confusing HipHop with HHVM.

HipHop took PHP code and basically turned it into a statically compiled C++ application. The resulting binary acted directly as a web server. It was pretty fast, but very limited.

HHVM is an actual JITing virtual machine for PHP. It's still huge (one of the project pages say that the binaries are nearly a hundred megs), but it's now a real-world reimplementation of PHP, capable of doing anything PHP can, including eventually being run by mere mortals with normal code.

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

#104
post #31

Earlier quoted context omitted.

Ahh yes, take the most criticized aspect of Java -- the obscene verbosity -- and cram it into PHP. Sounds wonderful.

Ironically, the obscene verbosity it is also a common trait of "not very smart" people.)

Nice unsupported crock.

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

#105
post #95

Earlier quoted context omitted.

Yeah, Laravel is pretty much the modern framework for people who can't divorce themselves from CodeIgniter.

What does Laravel do that other frameworks like FuelPHP and Yii don't do? I hear a lot about it but don't hear a lot about why it's so much better than others.

Yii still exists? Why?

Laravel has a half decent API and doesn't rely overmuch on (untestable) static functions. My evaluation of FuelPHP was admittedly brief, but let's take another look:

http://fuelphp.com/docs/general/controllers/base.html

and http://fuelphp.com/docs/general/models.html

For those who may be unaware, the issue with static functions is that, if you are calling a static method, you will execute that method. You're not able to choose not to execute that method (unless you do something surpassingly stupid like checking whether you're in test mode), and you can't generally make that method return anything other than what it normally does. Isolating that static method is rather difficult, and if that static method happens to call another one, well, it had better not be an issue with your test, because you're not going to stop it happening.

I know the FuelPHP devs have gone on record saying that Fuel doesn't rely heavily on static methods, and that static methods aren't a problem, and that to the degree to which there is a problem, they are gonna fix it, but...

http://pastebin.com/K03HMyVs

Here we compare CakePHP, Laravel, and FuelPHP (Thank you to Sebastian Bergmann for providing the statistics utility). For anyone actually evaluating these platforms, you may want to check out these benchmarks as well:

http://www.techempower.com/benchmarks

Without saying anything about how easy or fast it would be to develop for each of them, it seems that for trivial tasks Laravel > Fuel > Cake. From the code statistics, we have: Fuel: 785 static methods (22.45%) Cake: 530 static methods (7.96%) Yii: 483 static methods (7.95%) Laravel: 0 (0.00%)

Laravel seems pretty light as far as that goes, and generally when I'm faced with a large project I want the framework to be large as well. I feel like otherwise I'm going to end up finding or writing libraries for things that I feel like the framework should take care of. I would have a hard time recommending a PHP framework, imo they're all pretty much crap. Laravel is not better per se than other frameworks, but it does (far) less, and therefore does it less badly. Divine intervention alone will fix the PHP world at this point, but if you can avoid CodeIgniter, Yii, and FuelPHP, probably no other choices will be as bad.

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

#106
post #95

Earlier quoted context omitted.

What does Laravel do that other frameworks like FuelPHP and Yii don't do? I hear a lot about it but don't hear a lot about why it's so much better than others.

On the surface most of the popular PHP frameworks are not much different from each other. Basic MVC separation, some sort of dependency injection container (actually a service locator), Composer and standardized autoloading, etc. Once you dig into the coding aesthetics then the differences start to become clear. Yii isn't PSR compliant, both FuelPHP and Laravel make liberal use of Facades and/or __callStatic to prese…

$this->app['component']->function() gives me an instant headache. Which is why I always wind up giving up on Symfony/Silex after trying it out every now and then.

OTOH, I had a much easier time with Laravel, though it uses some of the same Symfony components under the hood.

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

#107
post #74

Other than Facebook, does anybody have HipHop running in production? Any big caveats?

Other than Facebook, does anybody need HipHop?

Yes, I do. I have a PHP app that can be CPU bound (lots of ML baked into async threads). It has been a godsend.

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

#108
post #72
post #49

Nice! CodeIgniter is at 100% now. I've been contemplating the switch to hhvm for my startup, now it seems likely.

Don't take this the wrong way, but you're actually developing new applications with CodeIgniter? Ugh...

I still do. Not sure how you can take your derisive comment the right way, either.

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

#109
post #47

Earlier quoted context omitted.

Drupal is also 100%, that's actually really nice. Want a quick performance boost on your Drupal site, replace PHP with HHVM

This is core though, from what I hear contrib still breaks (haven't tried myself)

I tried it two days ago after they made the fastcgi announcement. My day job sites are fairly big with what I consider a pretty large number of contrib modules. I managed to get it up and running, but the HHVM logs were full of notices and it finally bombed out after several requests (not enough to really warm up the VM) on something related to apachesolr, and another one related to GD, which is strange because we use imagemagick, but whatever. Sad Trombone.

The really cool part though, it truly was "drop in". Every bit of my existing nginx/fpm configs worked as is, so once it's a bit further along, it's just a matter of shutting down fpm and firing up HHVM.

There were also a couple of gotchas in the setup related to the fact that their apt installer installed HHVM configs that don't assume Fastcgi, so it took a little bit to figure out the correct edits to the init script and HHVM config so it'd listen on :9000 instead of :80, but all in all that it worked at all was really fun for a minute. Very excited about this project.

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

#110

Earlier quoted context omitted.

With array functions, the needle is first. With string functions, the haystack is first. https://gist.github.com/salathe/1672543

This still doesn't convince me it was ever a beneficial design.

I didn't claim it was beneficial, just consistent.
Post reply on HN