14

Following this rather comical interview with a Facebook "employee"...

Does anybody have any details on the Hyper PHP (now renamed to HipHop) that those smart as balls Facebook guys have developed?

genesis
  • 50,477
  • 20
  • 96
  • 125
Jon Rhoades
  • 496
  • 4
  • 12
  • Why? Since they are rewriting from scratch, couldn't they go for an already established option? Or do they think all the existing languages are not so good. – Christy John Jan 13 '10 at 10:59
  • 1
    I find it funny it would be called 'HyperPHP' as the H in PHP stands for Hyper. Hyper Hypertext Preprocessor. – metrobalderas Feb 01 '10 at 18:39
  • Related: http://stackoverflow.com/questions/2187405/facebooks-hiphop-whats-it-for – philfreo Feb 02 '10 at 20:27
  • @Christy, if they look for another language, it would mean rewriting Facebook. – Robo Feb 02 '10 at 20:37
  • @christy They aren't "rewriting from scratch". They claim that a full rewrite would have been far more difficult than the development of HPHP. – Frank Farmer Feb 04 '10 at 02:15

8 Answers8

6

The cat is out of the sack now:

http://developers.facebook.com/news.php?blog=1&story=358

HipHop for PHP isn't technically a compiler itself. Rather it is a source code transformer. HipHop programmatically transforms your PHP source code into highly optimized C++ and then uses g++ to compile it. HipHop executes the source code in a semantically equivalent manner and sacrifices some rarely used features — such as eval() — in exchange for improved performance. HipHop includes a code transformer, a reimplementation of PHP's runtime system, and a rewrite of many common PHP Extensions to take advantage of these performance optimizations.

Another article on ReadWrite Web confirms Facebook Gets Faster, Debuts Homegrown PHP Compiler and another one by Marco Tabini describes what you need to know.

Gordon
  • 312,688
  • 75
  • 539
  • 559
  • 5
    That quote annoys me. A compiler is a source code transformer. – Joseph Salisbury Feb 02 '10 at 20:33
  • 4
    So if I use XSLT to transform XML, I made a compiler, huh? – Viet Feb 04 '10 at 23:42
  • 1
    @Viet: Technically, yes. An XSLT processor *compiles* an XML file into another output format. – benzado Feb 13 '10 at 19:19
  • @Gordon Thank you for your response on this post. Can you please explain the advantages of HipHop Virtual machine- http://stackoverflow.com/questions/8697348/facebook-hiphop-virtual-machine-for-php Thanks – jeff musk Jan 02 '12 at 04:49
2

Maybe a myth, maybe still in development. But it's going to be posted here .

Henrik P. Hessel
  • 36,243
  • 17
  • 80
  • 100
2

I'd be surprised if the release is called HyperPHP, as that's also the name of an established web host

Adam Hopkinson
  • 28,281
  • 7
  • 65
  • 99
2

Now there's a rumor of some sort of PHP runtime release from Facebook on Tuesday Feb 2. That might be Hyper PHP.

Ken Bloom
  • 57,498
  • 14
  • 111
  • 168
0

Looks like someone tried to explain caching/opcodes to someone without any programming knowledge.

"... You see? Doing this is like, putting an H in front of PHP, H as in Hyper. So we get, Hyper-PHP, or HPHP. And it's super fast ..."

goorj
  • 443
  • 7
  • 15
0

Nop ... its not a myth

The concept is Awesome.. You can get you PHP site complied into HPHP ! then it ll work like java !:P

  • It is nothing like Java - no bytecode, no jit, no virtual machine. It simply transforms php code into optimized c++ and then compiles it to native machine code. – jckdnk111 Feb 05 '10 at 15:26
0

From your link...

Facebook employees know better than most the value of privacy.

Oh, really? Do they? Because everything I've ever read about Facebook is that they have no idea what privacy is or ever was.

The article can obviously not be trusted.

Tor Valamo
  • 33,261
  • 11
  • 73
  • 81
  • There is nothing to be trusted or not now anymore. Check out the link in my answer. It is official now. They will opensource HipHop for PHP tonight. – Gordon Feb 02 '10 at 18:31
-1

If performance is an issue, surely you'd look at e.g. Quercus instead ? (http://www.caucho.com/resin-3.0/quercus/) (I've never looked at Quercus, so I can't say much else)

David Goodwin
  • 4,184
  • 1
  • 22
  • 12