{"id":13398207,"url":"https://github.com/hippyvm/hippyvm","last_synced_at":"2026-03-12T02:31:14.123Z","repository":{"id":15332504,"uuid":"18062903","full_name":"hippyvm/hippyvm","owner":"hippyvm","description":"HippyVM - an implementation of the PHP language in RPython","archived":false,"fork":false,"pushed_at":"2022-04-26T15:50:13.000Z","size":8563,"stargazers_count":878,"open_issues_count":20,"forks_count":55,"subscribers_count":50,"default_branch":"master","last_synced_at":"2024-07-31T19:15:33.603Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://hippyvm.baroquesoftware.com/","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hippyvm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-03-24T13:10:37.000Z","updated_at":"2024-06-26T08:20:39.000Z","dependencies_parsed_at":"2022-08-26T07:11:51.416Z","dependency_job_id":null,"html_url":"https://github.com/hippyvm/hippyvm","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/hippyvm/hippyvm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hippyvm%2Fhippyvm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hippyvm%2Fhippyvm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hippyvm%2Fhippyvm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hippyvm%2Fhippyvm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hippyvm","download_url":"https://codeload.github.com/hippyvm/hippyvm/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hippyvm%2Fhippyvm/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30413005,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-12T00:40:14.898Z","status":"online","status_checked_at":"2026-03-12T02:00:07.260Z","response_time":114,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-30T19:00:20.204Z","updated_at":"2026-03-12T02:31:14.100Z","avatar_url":"https://github.com/hippyvm.png","language":"PHP","funding_links":[],"categories":["虚拟机 Virtual Machines","PHP"],"sub_categories":[],"readme":"# HippyVM\n\nHippyVM is an implementation of the PHP language using\n[RPython/PyPy](http://pypy.org \"pypy website\") technology.\n\nHippyVM right now works only on 64bit linux on x86 platform (this limitation\nis temporary though, the RPython toolchain supports 32 and 64 bit x86,\nARMv6 and ARMv7 on windows, os x and linux).\n\n\n## Building\n\nThe build process was tested for **Ubuntu 14.04**. Please create an issue/submit pull request if things are not working as expected.\n\n\n#### 1. Clone this repo ;)\n\n    git clone https://github.com/hippyvm/hippyvm\n\n#### 2. Get a full source checkout of RPython: \n\nThere are two alternative ways to achieve this, both equally functional:\n   - [a snapshot](https://bitbucket.org/pypy/pypy/get/default.tar.gz) of PyPy is the easiest way to get a large repository.\n\n        wget https://bitbucket.org/pypy/pypy/get/default.tar.gz \n        mkdir pypy \n        tar xfv default.tar.gz -C pypy --strip-components 1\n\n   \n   - [a full checkout](http://bitbucket.org/pypy/pypy) of the RPython repository translation toolchain (currently inside the PyPy repository). It will download the whole commit history of PyPy.\n\n        hg clone http://bitbucket.org/pypy/pypy\n\n \n#### 3. Get the build dependencies:\n\n    pip install -r requirements.txt\n    sudo apt-get install libmysqlclient-dev libpcre3-dev librhash-dev libbz2-dev php5-cli libffi-dev\n\n\n#### 4. The building process goes like this:\n\n    cd hippyvm\n    \u003cpath to pypy\u003e/rpython/bin/rpython -Ojit targethippy.py\n    \n\nThis will create a hippy-c binary that works mostly like a php-cli without\nreadline support.\n\n\n\n## Running it\n\nYou can run it with ./hippy-c \u003cfile.php\u003e. Example of benchmarks are in bench/\nsub-directory.\n\n\n\n## Contribution\n\nLike many open-source projects, HippyVM is looking for contributors.\n\nIn contrast with most language implementations that use C or C++, HippyVM has a low barrier of entry since it uses RPython, a subset of the Python language. It's really easy to write and read. Check out our implementation of [strstr](http://php.net/manual/pl/function.strstr.php)\n\n```python\n@wrap(['space', str, W_Root, Optional(bool)], aliases=['strchr'])\ndef strstr(space, haystack, w_needle, before_needle=False):\n    \"\"\"Find the first occurrence of a string.\"\"\"\n    try:\n        needle = unwrap_needle(space, w_needle)\n    except ValidationError as exc:\n        space.ec.warn(\"strstr(): \" + exc.msg)\n        return space.w_False\n    if len(needle) == 0:\n        space.ec.warn(\"strstr(): Empty delimiter\")\n        return space.w_False\n    pos = haystack.find(needle)\n    if pos \u003c 0:\n        return space.w_False\n    if before_needle:\n        return space.newstr(haystack[:pos])\n    else:\n        return space.newstr(haystack[pos:])\n```\n\nDoesn't look that scary, right?\n\nThe reasons why HippyVM uses RPython go beyond this README. If you are interested, you can read more [here](http://pypy.readthedocs.org/en/latest/getting-started-dev.html)\n\n\n### HippyVM's tests \n\nIf the project is up and running, which means the building section from this README went well, you can try to run HippyVM's tests.\n\n```bash\nPYTHONPATH=$PYTHONPATH:/path-to-pypy py.test testing\n```\n\nThis will execute all the tests that were explicitly written for HippyVM,\nthese tests are written in Python as well.\nThe example test for the `strstr` is [here](https://github.com/hippyvm/hippyvm/blob/master/testing/test_string_funcs.py#L696).\n\n### PHP's tests \n\nAfter having HippyVM tests up and running you can\ntry running PHP's tests against the HippyVM implementation. \n\n```bash\nPYTHONPATH=$PYTHONPATH:/path-to-pypy py.test test_phpt/\n```\n\nThose tests are exact copies from the [reference PHP implementation](https://github.com/php/php-src)\n\n\n### What now?\n\nIf you find something missing, broken, or poorly implemented:\n - please create an issue, or better,\n - create a pull request and update the AUTHORS file.\n\nAlso please visit us on the irc channel #hippyvm@freenode.net \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhippyvm%2Fhippyvm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhippyvm%2Fhippyvm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhippyvm%2Fhippyvm/lists"}