Questions tagged [hhvm]

HipHop VM (HHVM) is a virtual machine designed for executing programs written in Hack and PHP.

HipHop VM (HHVM) is a virtual machine designed to execute bytecode compiled just-in-time from both the PHP and Hack programming languages. It is maintained by Facebook.

HHVM is created as the successor of the HipHop for PHP (HPHPc) PHP execution engine, which is a PHP-to-C++ transpiler also created by Facebook. Based on the gained experience and aiming to solve issues brought by HPHPc, in early 2010 Facebook decided to create a JIT-based PHP virtual machine. Issues associated with HPHPc included its flattened curve for further performance improvements, lack of full support for the PHP language, and difficulties related to specific time- and resource-consuming development and deployment processes.

Versions and Support

+--------------+----------------+------------------+
|  LTS Version |  Release Date  |  End of Support  |
+--------------+----------------+------------------+
| 3.6          | 11 March 2015  | 28 Jan 2016      |
| 3.9          | 14 Aug 2015    | 15 July 2016     |
| 3.12         | 29 Jan 2016    | 30 Dec 2016      |
+--------------+----------------+------------------+

External links

522 questions
43
votes
3 answers

HHVM poor performance

I'm evaluating HipHop-PHP for compatibility and performance on our code base, but I'm getting very poor performance when running it with the built-in web server enabled. I have the following sample test program that calculates a Fibonacci sequence.…
Stephan Edelman
  • 550
  • 1
  • 5
  • 7
31
votes
1 answer

Is code written in Hack faster than code written in PHP on HHVM?

Can we expect a speed gain by transitioning from PHP to Hack on HHVM? I'm thinking of the strongly typed parameters / return types, in particular scalars, does that allow HHVM to do a better job at compiling the code to native code, or is the speed…
BenMorel
  • 30,280
  • 40
  • 163
  • 285
25
votes
4 answers

How to always use ignore-platform-reqs flag when running composer?

On my local machine, I have php v7.0.3. A project of mine has a dependency on php v5.5. So as expected, a simple run of composer install crashes: Your requirements could not be resolved to an installable set of packages. Problem 1 - This…
k0pernikus
  • 41,137
  • 49
  • 170
  • 286
22
votes
2 answers

How would you migrate from PHP to Hack?

Facebook have introduced a new programming language, which looks mostly like an extension to PHP. They've called it Hack and it's running on their HHVM engine. After seeing their website and reading a bit about it, I wondered how fluid a migration…
Ronni Egeriis Persson
  • 2,069
  • 1
  • 19
  • 42
22
votes
2 answers

How to programmatically check if running on HHVM?

I need to run a given package on both HHVM runtime and traditional PHP runtime. My question: is there a way to check programmatically if current environment is HHVM? Something like this:
marcio
  • 8,631
  • 9
  • 45
  • 81
18
votes
2 answers

hhvm-fastcgi + nginx how to make it display fatal errors in the browser

I've been playing with HHVM config file and I have yet to be able to make it output any fatal error to the browser. It displays E_NOTICE and E_WARNING but when any E_ERROR happens it leaves the page blank and the error only appears in the HHVM log…
Satake
  • 793
  • 6
  • 11
16
votes
1 answer

Nginx PHP Failing with Large File Uploads (Over 6 GB)

I am having a very weird issue uploading larges files over 6GB. My process works like this: Files are uploaded via Ajax to an php script. The PHP upload script takes the $_FILE and copies it over in chunks, as in this answer to a tmp location. The…
Devin Dixon
  • 9,088
  • 20
  • 70
  • 136
14
votes
1 answer

docker "Couldn't find an alternative telinit implementation to spawn"

I'm a MAC user and installed docker inside a VM "ubuntu 14.04". (I installed everything manually, NOT using docker toolbox) The problem is when I start specific container (other containers run normally), it gives me this weird error message…
Mohamed Kamal
  • 317
  • 1
  • 2
  • 10
14
votes
1 answer

Working with pretty urls on apache and fastcgi after hhvm installation

I needed slim php to work with pretty urls using .htaccess, well no problem. RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^ index.php [QSA,L] Now I ran this using hhvm, fastcgi using this virtual host config.
Joey Hipolito
  • 2,828
  • 7
  • 38
  • 78
14
votes
2 answers

PHP - static type checking a-la PhpStorm

I am a strongly-typed language supporter but I am working on a big PHP project. I have been using PhpStorm and I love the extra type hinting you can provide, with comments like these: /** @var \Payments $payment */ /** @property \Payments $payment…
dan
  • 15,066
  • 19
  • 57
  • 88
14
votes
5 answers

Debugging in HHVM?

When running my PHP scripts in HHVM I see that I can pass a debug-host and debug-port arguments, but I can't seem to work out exactly what it does and how to use it. Are those arguments for debugging HHVM itself (or maybe the compiled PHP itself) or…
Narcissus
  • 3,074
  • 3
  • 25
  • 39
13
votes
2 answers

HHVM - FastCGI: poor performance

I'm trying to migrate from PHP 5.4 (with FPM as FastCGI and apc) on nginx to HHVM - FastCGI (nginx too). My application is an ad server with Slim as a framework. The ad server is connecting to redis, to memcached (for socket and http), to MySQL, to…
11
votes
3 answers

How to make MySQL driver for HHVM return IDs as integers?

I noticed that my Laravel API does not return entity identifiers (the primary keys) as integers. In Api\PostController.php::show(): function index() { $posts = Post::all(); return $posts; } Which returns something like: [{ "id": "1", …
mauvm
  • 3,226
  • 3
  • 13
  • 18
11
votes
1 answer

Configure ini file for HHVM 3.0 via socket with nginx

I'm able to start the HipHop VM to use a unix socket. I can accomplish this via: /usr/bin/hhvm --config /etc/hhvm/server.ini --mode daemon -vPidFile=/var/run/hhvm/pid -vServer.Type=fastcgi -vServer.FileSocket=/var/run/hhvm/hhvm.sock However, I…
Ray
  • 36,097
  • 17
  • 85
  • 129
10
votes
1 answer

How to unset an environment variable using php?

I know I can set an environment variable using putenv("ENV_FOO=SOMETHING"); and get the value via: getenv("ENV_FOO"); If the variable isn't set, getenv("ENV_FOO") will return false. I have a feature set that may be set via an environment variable,…
k0pernikus
  • 41,137
  • 49
  • 170
  • 286
1
2 3
34 35