Question

Does anyone know if it is possible to include an auto_prepend file with HipHop hhvm (latest version)?

I don't see in the options or the documentation anything about this feature.

Was it helpful?

Solution

No, there is currently no way to do this. I've love to get a pull request from you though :)

OTHER TIPS

Support for auto_prepend_file and auto_append_file was added in HHVM 3.1.0 (Released 2014). These behave the same way as their Zend PHP counterparts.

If running an older HHVM version, there was (and still is) also the request_init_document setting is similar auto_prepend_file in that it executes before the main script for this request executes.

However, it has two important differences:

  1. The RequestInitDocument will not run once before every single web request. Instead, HHVM runs request_init_document only once a longer-lived thread. The state of the virtual machine after request_init_document completed is captured in a snapshot and then restored at the start of multiple future requests, until it gets recycled and recreated. HHVM 3.22.0 - Server Flow Documentation
  2. It applies only to web requests, not CLI. https://github.com/facebook/hhvm/issues/1323
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top