views:

1428

answers:

4

Yesterday Facebook launched HipHop, a sourcecode-converter from php to c++. The set of php functions and constructions is more limited that standard php.

Are the current popular php frameworks (ZF, CakePHP, symphony) compatible with HipHop? If not, which parts of this frameworks are not usable?

+7  A: 

If I'm not mistaken, HipHop has not been released yet -- even the wiki page linked from the Facebook annoucement yesterday is not up yet.

So, it's going to be a bit hard to answer, right now.


I suppose it'll all depend on :

  • The features used by the Frameworks -- like already said here and there, stuff like eval is not supported by HipHop
  • The PHP extensions used by the Frameworks : only a couple of those have been ported by Facebook to HipHop.
  • Depending on the Frameworks and your specific needs, maybe/probably some subsets of the Frameworks you are using will be supported, even if not every available components... I suppose time will tell which ;-)
Pascal MARTIN
+3  A: 

With at least ZF and Symfony being used for Enterprise level applications, chances are pretty good they will run with HipHop. If not now, then sooner or later. However, the question is not so much if they can run with these frameworks, but how your supporting IT architecture looks like.

HipHop is for scaling large multiserver high traffic sites like Facebook. In your regular web application, you will likely get no advantage out of it. Just continue to use memcache and APC.

See these related articles:

Gordon
If a framework uses eval, it may struggle to use HipHop. I suppose if HipHop gains traction, this constraint will move any frameworks to stop using eval in the future
Jon Winstanley
@Jon Yes. That's what I wanted to imply with *if not now ...* and what it says in the linked articles. ZF doesn't use any `eval` afaik, so it *might* work. Only *might*, because it is not only `eval`. It's also any extensions that Facebook doesn't use atm.
Gordon
+1 for the referenced articles its very helpful
RSK
+2  A: 

While I'm sure most of us are curious about what HipHop is going to be, I know it will not be a replacement for PHP - it's very much a niche product: unless you're running a large server farm then the performance benefits vs the maintenance costs just wouldn't justify it.

Perhaps it might be an interesting alternative to use encoded PHP for some people - but again this introduces even greater maintenance overheads. The only low-volume scenario where a compiled PHP would seem to make a lot of sense is for embedded devices (where the software exists to support the hardware and not vice versa) and for very high security installations (where its not a good idea to have a interpreter available).

It's far to early to be able to say what PHP software will work with it. However even once thats established, I'd want to see a solid commitment from any supplier that they were going to explicitly support HipHop in the future before I switched.

C.

symcbean
...and I expect it would be useful for standalone apps too.Found this video which I'm currently watching http://www.ustream.tv/recorded/4409735
symcbean
If someone is creating a _new_ web-app which expects a very high volume of traffic so that performance may be a concern, maybe they should consider using something other than PHP in the first place. But in 99% of cases, you're not going to face these problems... FB has 200+ _million_ users.
John
+2  A: 

I won't repeat what has already been said, I'll just add that as soon as HipHop is released you can count on the opensource community to submit patches for your favorite framework for increased compatibility with HipHop.

Also, one good way to test whether your favorite framework is compatible or not would be to launch the test suite using HPHPi (you then know where to concentrate your patching effort ;).

Geoffrey Bachelet