{"id":13399777,"url":"https://github.com/reactphp/reactphp","last_synced_at":"2025-12-16T17:37:17.703Z","repository":{"id":3250172,"uuid":"4287921","full_name":"reactphp/reactphp","owner":"reactphp","description":"Event-driven, non-blocking I/O with PHP.","archived":false,"fork":false,"pushed_at":"2024-11-25T17:18:22.000Z","size":1374,"stargazers_count":9019,"open_issues_count":0,"forks_count":727,"subscribers_count":364,"default_branch":"1.x","last_synced_at":"2025-05-12T13:04:49.766Z","etag":null,"topics":["php","reactphp"],"latest_commit_sha":null,"homepage":"https://reactphp.org","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/reactphp.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"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,"zenodo":null},"funding":{"github":["reactphp","clue","WyriHaximus"],"open_collective":"reactphp"}},"created_at":"2012-05-10T18:00:00.000Z","updated_at":"2025-05-11T09:33:32.000Z","dependencies_parsed_at":"2023-11-23T22:05:06.727Z","dependency_job_id":"151c1f83-37e5-478c-943b-4606af207360","html_url":"https://github.com/reactphp/reactphp","commit_stats":{"total_commits":766,"total_committers":41,"mean_commits":"18.682926829268293","dds":0.4778067885117493,"last_synced_commit":"b8156fc7051d16dcc27bb35824f349c2a4dc38f8"},"previous_names":["reactphp/react"],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reactphp%2Freactphp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reactphp%2Freactphp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reactphp%2Freactphp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reactphp%2Freactphp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reactphp","download_url":"https://codeload.github.com/reactphp/reactphp/tar.gz/refs/heads/1.x","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253745150,"owners_count":21957317,"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":["php","reactphp"],"created_at":"2024-07-30T19:00:42.698Z","updated_at":"2025-12-16T17:37:12.665Z","avatar_url":"https://github.com/reactphp.png","language":"PHP","readme":"\u003cdiv align=\"center\"\u003e\n    \u003ca href=\"https://reactphp.org\"\u003e\u003cimg src=\"https://rawgit.com/reactphp/branding/master/reactphp-logo.svg\" alt=\"ReactPHP Logo\" width=\"160\"\u003e\u003c/a\u003e\n\u003c/div\u003e\n    \n\u003cbr\u003e\n    \n\u003cdiv align=\"center\"\u003e\n    \u003cstrong\u003eEvent-driven, non-blocking I/O with PHP.\u003c/strong\u003e\n\u003c/div\u003e\n\n\u003cbr\u003e\n\n\u003cdiv align=\"center\"\u003e\n    \u003ca href=\"https://github.com/reactphp/reactphp/actions\"\u003e\u003cimg src=\"https://github.com/reactphp/reactphp/actions/workflows/ci.yml/badge.svg\" alt=\"Build Status\"\u003e\u003c/a\u003e\n\u003c/div\u003e\n\n\u003cbr\u003e\n\nReactPHP is a low-level library for event-driven programming in PHP. At its core\nis an event loop, on top of which it provides low-level utilities, such as:\nStreams abstraction, async DNS resolver, network client/server, HTTP\nclient/server and interaction with processes. Third-party libraries can use these\ncomponents to create async network clients/servers and more.\n\n```php\n\u003c?php\n\n// $ composer require react/http react/socket # install example using Composer\n// $ php example.php # run example on command line, requires no additional web server\n\nrequire __DIR__ . '/vendor/autoload.php';\n\n$server = new React\\Http\\HttpServer(function (Psr\\Http\\Message\\ServerRequestInterface $request) {\n    return React\\Http\\Message\\Response::plaintext(\n        \"Hello World!\\n\"\n    );\n});\n\n$socket = new React\\Socket\\SocketServer('127.0.0.1:8080');\n$server-\u003elisten($socket);\n\necho \"Server running at http://127.0.0.1:8080\" . PHP_EOL;\n```\n\nThis simple web server written in ReactPHP responds with \"Hello World!\" for every request.\n\nReactPHP is production ready and battle-tested with millions of installations\nfrom all kinds of projects around the world. Its event-driven architecture makes\nit a perfect fit for efficient network servers and clients handling hundreds or\nthousands of concurrent connections, long-running applications and many other\nforms of cooperative multitasking with non-blocking I/O operations. What makes\nReactPHP special is its vivid ecosystem with hundreds of third-party libraries\nallowing you to integrate with many existing systems, such as common network\nservices, database systems and other third-party APIs.\n\n* **Production ready** and battle-tested.\n* **Rock-solid** with stable long-term support (LTS) releases.\n* **Requires no extensions** and runs on any platform - no excuses!\n* Takes advantage of **optional extensions** to get better performance when available.\n* **Highly recommends latest version of PHP 7+** for best performance and support.\n* **Supports legacy PHP 5.3+ and HHVM** for maximum compatibility.\n* **Well designed** and **reusable components**.\n* **Decoupled parts** so they can be replaced by alternate implementations.\n* Carefully **tested** (unit \u0026 functional).\n* Promotes **standard PSRs** where possible for maximum interoperability.\n* Aims to be **technology neutral**, so you can use your preferred application stack.\n* Small **core team of professionals** supported by **large network** of outside contributors.\n\nReactPHP is non-blocking by default. Use workers for blocking I/O.\nThe event loop is based on the reactor pattern (hence the name) and strongly\ninspired by libraries such as EventMachine (Ruby), Twisted (Python) and\nNode.js (V8).\n\n\u003e This repository you're currently looking at is mostly used as a meta\n  repository to discuss and plan all things @ReactPHP. See the individual\n  components linked below for more details about each component, its\n  documentation and source code.\n\n## Core Components\n\n* **EventLoop**\n  ReactPHP's core reactor event-loop.\n  [Read the documentation](https://github.com/reactphp/event-loop)\n\n* **Stream**\n  Event-driven readable and writable streams for non-blocking I/O in ReactPHP.\n  [Read the documentation](https://github.com/reactphp/stream)\n\n* **Promise**\n  Promises/A implementation for PHP.\n  [Read the documentation](https://github.com/reactphp/promise)\n\n* **Async**\n  Async utilities and fibers for ReactPHP.\n  [Read the documentation](https://github.com/reactphp/async)\n\n## Network Components\n\n* **Socket**\n  Async, streaming plaintext TCP/IP and secure TLS socket server and client connections for ReactPHP.\n  [Read the documentation](https://github.com/reactphp/socket)\n\n* **Datagram**\n  Event-driven UDP client and server sockets for ReactPHP.\n  [Read the documentation](https://github.com/reactphp/datagram)\n\n* **HTTP**\n  Event-driven, streaming HTTP client and server implementation for ReactPHP.\n  [Read the documentation](https://github.com/reactphp/http)\n\n* **DNS**\n  Async DNS resolver for ReactPHP.\n  [Read the documentation](https://github.com/reactphp/dns)\n\n## Utility Components\n\n* **Cache**\n  Async caching for ReactPHP.\n  [Read the documentation](https://github.com/reactphp/cache)\n\n* **ChildProcess**\n  Library for executing child processes.\n  [Read the documentation](https://github.com/reactphp/child-process)\n\n* **PromiseTimer**\n  Trivial timeout implementation for ReactPHP's Promise lib.\n  [Read the documentation](https://github.com/reactphp/promise-timer)\n\n* **PromiseStream**\n  The missing link between Promise-land and Stream-land, built on top of ReactPHP.\n  [Read the documentation](https://github.com/reactphp/promise-stream)\n\n## Built with ReactPHP\n\n* **Thruway**\n  PHP Client and Router Library for Autobahn and WAMP (Web Application Messaging\n  Protocol) for Real-Time Application Messaging\n  [voryx/Thruway](https://github.com/voryx/Thruway)\n\n* **PPM - PHP Process Manager**\n  PPM is a process manager, supercharger and load balancer for modern PHP\n  applications.\n  [php-pm/php-pm](https://github.com/php-pm/php-pm)\n\n* **php-ar-drone**\n  🚁 Port of node-ar-drone which allows user to control a Parrot AR Drone over\n  PHP\n  [jolicode/php-ar-drone](https://github.com/jolicode/php-ar-drone)\n\n* **Ratchet**\n  Asynchronous WebSocket server\n  [ratchetphp/Ratchet](https://github.com/ratchetphp/Ratchet)\n\n* **Predis\\Async**\n  Asynchronous PHP client library for Redis built on top of ReactPHP\n  [nrk/predis-async](https://github.com/nrk/predis-async)\n\n* **clue/redis-server**\n  A Redis server implementation in pure PHP\n  [clue/redis-server](https://github.com/clue/php-redis-server)\n\n[And many more on our wiki page »](https://github.com/reactphp/react/wiki/Users)\n\n## Articles\n\n* **Sergey Zhuk**\n  A series of articles covering ReactPHP: from the basics to the real\n  application examples.\n  [sergeyzhuk.me](http://sergeyzhuk.me/reactphp-series)\n\n* **Cees-Jan Kiewiet**\n  Blog series about several ReactPHP components and how they work.\n  [blog.wyrihaximus.net](http://blog.wyrihaximus.net/categories/reactphp-series/)\n\n* **Loïc Faugeron**\n  Super Speed Symfony - ReactPHP.\n  [gnugat.github.io](https://gnugat.github.io/2016/04/13/super-speed-sf-react-php.html)\n\n* **Marc J. Schmidt**\n  Bring High Performance Into Your PHP App (with ReactPHP).\n  [marcjschmidt.de](http://marcjschmidt.de/blog/2014/02/08/php-high-performance.html)\n  \n* **Marc Morera**\n  When ReactPHP meet Symfony\n  [medium.com/@apisearch](https://medium.com/@apisearch/symfony-and-reactphp-series-82082167f6fb)\n\n## Talks\n\n* **Christian Lück**\n  [Pushing the limits with ReactPHP](https://www.youtube.com/watch?v=-5ZdGUvOqx4)\n\n* **Jeremy Mikola**\n  [Async PHP With React](https://www.youtube.com/watch?v=s6xrnYae1FU)\n\n* **Igor Wiedler**\n  [Event-driven PHP](https://www.youtube.com/watch?v=MWNcItWuKpI)\n\n## Getting started\n\nReactPHP consists of a set of individual [components](#core-components).\nThis means that instead of installing something like a \"ReactPHP framework\", you actually\npick only the components that you need.\n\nThis project follows [SemVer](https://semver.org/) for all its stable components.\nThe recommended way to install these components is [through Composer](https://getcomposer.org/).\n[New to Composer?](https://getcomposer.org/doc/00-intro.md)\n\nFor example, this may look something like this:\n\n```bash\n# recommended install: pick required components\ncomposer require react/event-loop react/http\n```\n\nAs an alternative, we also provide a meta package that will install all stable\ncomponents at once. Installing this is only recommended for quick prototyping,\nas the list of stable components may change over time. This meta package can be\ninstalled like this:\n\n```bash\n# quick protoyping only: install all stable components\ncomposer require react/react:^1.4\n```\n\nFor more details, check out [ReactPHP's homepage](https://reactphp.org/) for\nquickstart examples and usage details.\n\nSee also the combined [changelog for all ReactPHP components](https://reactphp.org/changelog.html)\nfor details about version upgrades.\n\n## Support\n\nDo you have a question and need help with ReactPHP? Don't worry, we're here to help!\n\nAs a first step, check the elaborate documentation that comes with each\ncomponent (see links to individual documentation for each component above).\nIf you find your question is not answered within the documentation, there's a\nfair chance that it may be relevant to more people. Please do not hesitate to\nfile your question as an issue in the relevant component so others can also\nparticipate.\n\nYou can also check out our official [Gitter chat room](https://gitter.im/reactphp/reactphp).\nMost of the people involved in this project are available in this chat room, so many\nquestions get answered in a few minutes to some hours. We also use this chat room\nto announce all new releases and ongoing development efforts, so consider\nstaying in this chat room for a little longer.\n\nAlso follow [@reactphp](https://twitter.com/reactphp) on Twitter for updates.\nWe use this mostly for noteworthy, bigger updates and to keep the community\nupdated about ongoing development efforts. You can always use the `#reactphp`\nhashtag if you have anything to share!\n\nWe're a very open project and we prefer public communication whenever possible,\nso that more people can participate and help getting the best solutions available.\nAt the same time, we realize that some things are better addressed in private.\nWhether you just want to say *thank you*, want to report a security issue or\nwant to help sponsor a certain feature development, you can reach out to the\ncore team in private by sending an email to `support@reactphp.org`. Please keep in\nmind that we're a small team of volunteers and do our best to support anybody\nreaching out.\n\nDo you want to support ReactPHP? Awesome! Let's start with letting the the world\nknow why you think ReactPHP is awesome and try to help others getting on board!\nSend a tweet, write a blog post, give a talk at your local user group or\nconference or even write a book. There are many ways you can help. You can\nalways reach out to us in private and help others in our support channels.\nThank you!\n\n## Tests\n\nTo run the test suite, you first need to clone this repo and then install all\ndependencies [through Composer](https://getcomposer.org/):\n\n```bash\ncomposer install\n```\n\nTo run the test suite, go to the project root and run:\n\n```bash\nvendor/bin/phpunit\n```\n\nThe test suite also contains a number of functional integration tests that rely\non a stable internet connection. Due to the vast number of integration tests,\nthese are skipped by default during CI runs. If you also do not want to run these,\nthey can simply be skipped like this:\n\n```bash\nvendor/bin/phpunit --exclude-group internet\n```\n\n## License\n\nMIT, see LICENSE.\n","funding_links":["https://github.com/sponsors/reactphp","https://github.com/sponsors/clue","https://github.com/sponsors/WyriHaximus","https://opencollective.com/reactphp"],"categories":["PHP","Alternative libraries","目录","Table of Contents","武器库"],"sub_categories":["Tunnel","事件 Event","Event","后端"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freactphp%2Freactphp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freactphp%2Freactphp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freactphp%2Freactphp/lists"}