{"id":13824171,"url":"https://github.com/polarphp/polarphp","last_synced_at":"2025-04-12T22:37:03.443Z","repository":{"id":217773588,"uuid":"142961947","full_name":"polarphp/polarphp","owner":"polarphp","description":"The compiler and runtime of PHP programming language","archived":false,"fork":false,"pushed_at":"2020-02-20T12:43:12.000Z","size":22506,"stargazers_count":1039,"open_issues_count":15,"forks_count":72,"subscribers_count":55,"default_branch":"master","last_synced_at":"2025-04-04T02:07:57.795Z","etag":null,"topics":["cpp17","libpdk","php","php7","polarphp","polarvm","zendvm"],"latest_commit_sha":null,"homepage":"https://polarphp.org","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/polarphp.png","metadata":{"files":{"readme":"README.en_US.md","changelog":"NEWS","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-07-31T04:23:39.000Z","updated_at":"2025-03-18T08:24:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"8e832b58-e6b2-4aac-927a-532a03528fc3","html_url":"https://github.com/polarphp/polarphp","commit_stats":null,"previous_names":["polarphp/polarphp"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/polarphp%2Fpolarphp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/polarphp%2Fpolarphp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/polarphp%2Fpolarphp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/polarphp%2Fpolarphp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/polarphp","download_url":"https://codeload.github.com/polarphp/polarphp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248643006,"owners_count":21138353,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["cpp17","libpdk","php","php7","polarphp","polarvm","zendvm"],"created_at":"2024-08-04T09:00:57.927Z","updated_at":"2025-04-12T22:37:03.421Z","avatar_url":"https://github.com/polarphp.png","language":"C++","funding_links":[],"categories":["C++"],"sub_categories":[],"readme":"\u003cimg width=\"350\" src =\"https://raw.githubusercontent.com/polarphp/polarphp/master/assets/images/polarphp.png?sanitize=true\"/\u003e\n\n## Let the PHP language be great again \n\n## Why did I launch the `polarphp` project?\n\nWith the strong rise of `Go` and `NodeJS`, the market share of `PHP` has gradually been eroded, and the `PHP` official still sticks to the Web programming field. The more things you want to keep, the more you can't keep it. `polarphp` draws on the related features of `NodeJS` and `Go` to repackage `zendVM`, remove some of the old deprecated features and strong `Web` attributes of `PHP`, by implementing a new set of runtime framework `libpdk` , the `PHP` language is built into a true universal scripting language, empower `PHP`, let it have asynchronous programming, coroutine, thread, built-in `unicode` support, standard file `IO` and so on. So that the `PHP` programmer can not only do the `web` application, but also face the real server application. `polarphp` is not a new language, but a new compiler with runtime for the `PHP` language.\n\n## Main features\n\n- [ ] Compatible with the latest `PHP` language standard, removing obsolete language features\n- [ ] Built-in unicode standard support\n- [ ] Full-featured runtime library support, support for asynchronous programming, multi-threading and coroutine, etc.\n- [ ] Built-in package manager\n- [ ] Built-in document generator\n\n## Development plan\n\nDue to limited development resources, the development plan is tentatively scheduled as follows:\n\n1. Compile `zend VM` with `cmake` to generate `polarphp` custom version of `PHP` language virtual machine\n2. Language support project, language testing framework, porting `lit` test framework for `LLVM` project\n3. Implement `polarphp` driver to implement `PHP` code from the command line\n4. Regression testing of the `polarphp` virtual machine, tentatively running the language virtual machine related regression test of `PHP`\n5. Implement the built-in function of `polarphp`\n6. Publish the `docker` image of the core virtual machine\n7. Integrate the `libpdk` runtime framework\n8. Achieve user-friendly installation, try to install `polarphp` in a minimum of steps\n9. Implementation package manager\n10. Implement language widgets such as document generation tools, etc.\n\n## Start the experience\n\n\u003e current we just test at macOS platform and you need run system in docker system.\n\n### clone polarphp repository\n```\ngit clone https://github.com/polarphp/polarphp.git\ncd polarphp\ngit submodule init\ngit submodule update\ngit checkout v0.0.1-alpha\n```\n### run build script\n```\n./devtools/scripts/build_polarphp.sh\n```\nAt this time, the script starts compiling the relevant image, which takes a long time. Please wait patiently. Wait for the compilation to complete, you run:\n```\ndocker images\n```\nAt this time, please confirm that there is the following docker image in the output:\n1. polarphp_base_env\n2. polarphp_debug\n\nIf there are no problems, we start testing whether polarphp is working properly in docker image.\n```\ndocker run --rm -it polarphp_debug\n```\nAfter entering the container, enter our polarphp command line program:\n```\npolar --version\n```\nIf you get the following output:\n```\npolarphp 0.0.1-git (built: 2019-01-27 12:22)\nCopyright (c) 2016-2018 The polarphp foundation (https://polar.foundation)\nZend Engine v3.3.0-dev, Copyright (c) 1998-2018 Zend Technologies\n```\n\nCongratulations, you have successfully compiled the polarphp runtime environment. When compiling the image, we put a test script in the ~/temp/ folder.\n```\nif (function_exists('\\php\\retrieve_version_str')) {\n    echo \"version str: \" . \\php\\retrieve_version_str() . \"\\n\";\n}\n\nif (function_exists('\\php\\retrieve_major_version')) {\n    echo \"major version: \" . \\php\\retrieve_major_version() . \"\\n\";\n}\n\nif (function_exists('\\php\\retrieve_minor_version')) {\n    echo \"minor version: \" . \\php\\retrieve_minor_version() . \"\\n\";\n}\n\nif (function_exists('\\php\\retrieve_patch_version')) {\n    echo \"patch version: \" . \\php\\retrieve_patch_version() . \"\\n\";\n}\n```\nYou can run the following command:\n```\npolar ~/temp/main.php\n```\nIf there are no errors, you will get the following output:\n\n```\nversion str: polarphp 0.0.1-git\nmajor version: 0\nminor version: 0\npatch version: 1\n```\nThank you for testing polarphp, what is the problem, you can put it in the github issue list\n\n## Community\n\nAt present, we only target Chinese users for the time being, so we use the communication method of WeChat and `QQ` group. The following is the QR code. Interested students can scan the code to join:\n\n\u003e PS:Please indicate the scan code, for example: learn `polarphp` or `PHP` enthusiasts\n\n\u003c/div\u003e\n\u003ctable\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\" valign=\"middle\"\u003e\n        \u003ca href=\"https://www.oschina.net/\" target=\"_blank\"\u003e\n         \u003cimg width = \"200\" src=\"https://raw.githubusercontent.com/qcoreteam/zendapi/master/assets/images/qq.png\"/\u003e\n        \u003c/a\u003e\n      \u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"middle\"\u003e\n        \u003ca href=\"https://gitee.com/?from=polarphp.org\" target=\"_blank\"\u003e\n          \u003cimg width = \"200\" src=\"https://raw.githubusercontent.com/qcoreteam/zendapi/master/assets/images/wechat.png\"/\u003e\u003c/div\u003e\n        \u003c/a\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\u003ctr\u003e\u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n## Currently has the following working groups\n\n1. Language core team\n2. Standard library team\n3. Ecosystem project team\n4. Document team\n5. Official website maintenance team\n\n## License\n\n`polarphp` is redeveloped on top of the `php` language project, following the agreement of the `php` project. For details, please see: [Project Agreement](/LICENSE)\n\n## Contribution code guidance\n===========================\n- [CODING_STANDARDS](CODING_STANDARDS)\n- [README.GIT-RULES](docs/README.GIT-RULES)\n- [README.MAILINGLIST_RULES](docs/README.MAILINGLIST_RULES)\n- [README.RELEASE_PROCESS](docs/README.RELEASE_PROCESS)\n\n## Acknowledgement\n\u003c!--Acknowledgement begin--\u003e\n\u003ctable\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\" valign=\"middle\"\u003e\n        \u003ca href=\"https://www.oschina.net/\" target=\"_blank\"\u003e\n          \u003cimg width=\"177px\" src=\"https://raw.githubusercontent.com/polarphp/polarphp/master/assets/images/osc.svg?sanitize=true\"\u003e\n        \u003c/a\u003e\n      \u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"middle\"\u003e\n        \u003ca href=\"https://gitee.com/?from=polarphp.org\" target=\"_blank\"\u003e\n          \u003cimg width=\"177px\" src=\"https://raw.githubusercontent.com/polarphp/polarphp/master/assets/images/gitee.svg?sanitize=true\"\u003e\n        \u003c/a\u003e\n      \u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"middle\"\u003e\n        \u003ca href=\"http://www.hacknown.com/\" target=\"_blank\"\u003e\n          \u003cimg width=\"177px\" src=\"https://raw.githubusercontent.com/polarphp/polarphp/master/assets/images/hacknown.svg?sanitize=true\"\u003e\n        \u003c/a\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\u003ctr\u003e\u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\u003c!--Acknowledgement end--\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpolarphp%2Fpolarphp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpolarphp%2Fpolarphp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpolarphp%2Fpolarphp/lists"}