HippyVM is an implementation of the PHP language using RPython/PyPy technology.
HippyVM right now works only on 64bit linux on x86 platform (this limitation is temporary though, the RPython toolchain supports 32 and 64 bit x86, ARMv6 and ARMv7 on windows, os x and linux).
-
You will need this repository, so please make yourself a "clone" :)
-
Install Python dependecies from
requirements.txt
file. The usual way is to create a virtualenv and then inside, but installing system wide (with sudo) is possible as well. Then:pip install -r requirements.txt
If pip is not aviliable, please check this.
-
Install system packages:
libpcre-dev
php5
libffi5-dev
-
Edit the PHP config (php.ini)
Find and edit line to
short_open_tag = On
Not sure where the php.ini file is? Check this thread Dude, where's my php.ini?
-
You'll need a source of the RPython translation toolchain. You may try cloning the whole repo but having a snapshot of PyPy is the easiest way to get it fast.
-
Building goes like this (in hippyvm main directory):
python <path to pypy>/rpython/bin/rpython -Ojit targethippy.py
This will create a hippy-c binary that works mostly like a php cli without readling support.
You can run it with ./hippy-c <file.php>. Example of benchmarks are in bench/ subdirectory.
You'll need py.test
:
pip install pytest
To run tests fot hippyvm:
py.test testing/
to run PHP's test on the top of the hippyvm interpreter:
py.test test_phpt/