You can utilise the constant HHVM_VERSION
specific to HHVM:
if (defined('HHVM_VERSION')) {
// Code
}
You can put this in your own function if you want.
function is_hhvm() {
return defined('HHVM_VERSION');
}
if (is_hhvm()) {
// Code
}
Source: http://www.hhvm.com/blog/2393/hhvm-2-3-0-and-travis-ci