From what I've read about PHP HipHop – it serves the purpose of converting PHP code into C++. The bit I did not understand is how the actual code is later on executed and whether only some elements of code can be HipHop'ed.
I have files helpers.inc.php
(contains a lot of functions), database.class.inc.php
(contains PDO extension) and similar that don't change often. I'd like to convert them into C++ PHP module that I could include to other project files or simply make them available across the system.
Is that possible using PHP HipHop?
You've been misled and should read the Running HipHop wiki page:
If you want to create extensions, you should dive into the documentation: http://www.php.net/manual/en/internals2.php
But mostly, YAGNI.