Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/blogdaren/PHPForker
A simple Multi-Process programming skeleton written in PHP and learned much from Workerman, which mainly help us to find out how Workerman core works.
https://github.com/blogdaren/PHPForker
multi-process php phpforker socket workerman
Last synced: 3 months ago
JSON representation
A simple Multi-Process programming skeleton written in PHP and learned much from Workerman, which mainly help us to find out how Workerman core works.
- Host: GitHub
- URL: https://github.com/blogdaren/PHPForker
- Owner: blogdaren
- Created: 2018-10-13T19:42:57.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-09-24T04:18:36.000Z (over 3 years ago)
- Last Synced: 2024-07-31T12:08:08.422Z (6 months ago)
- Topics: multi-process, php, phpforker, socket, workerman
- Language: PHP
- Homepage:
- Size: 1.12 MB
- Stars: 113
- Watchers: 7
- Forks: 17
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- favorite-link - PHPForker 是一个 PHP 多进程编程骨架,借鉴了 Workerman 诸多优良编程思想,剥离了其中的网络事件库抽象部分,集中围绕多进程编程,为了便于直观的调试以及保持最轻的多进程骨架,所以简单的内嵌了一个基于 select 多路复用技术的 TCP & UDP Server。
README
# PHPForker
## What is it?
A simple Multi-Process programming skeleton written in PHP and learned much from [Workerman](https://www.workerman.net), which remove the part of Network Event Library, it aims at two aspects by programming personally:
* `Help us find out PHP Multi-Process programming`
* `Help us find out how Workerman core works`## PHPForker是什么?
PHPForker是一个PHP多进程编程骨架,借鉴了Workerman诸多优良编程思想,剥离了其中的网络事件库抽象部分,集中围绕多进程编程,为了便于直观的调试以及保持最轻的多进程骨架,所以简单的内嵌了一个基于select多路复用技术的 TCP & UDP Server。为了学习如此优秀的Workerman框架,作者亲自撸了一遍,本项目旨在深入学习和分享:
* `弄明白PHP多进程编程核心思想`
* `弄明白Workerman内核工作原理`## Special Note
PHPForker is only an experimental work for study, so don't use it in a production environment unless you know what you're doing, it is better to use the official [Workerman](https://www.workerman.net).## 特别说明
PHPForker只是一个用于学习研究的实验性项目,所以不要在生产环境中使用它,请使用官方[Workerman](https://www.workerman.net),除非你知道自己在做什么。## Installation
```
composer require blogdaren/phpforker
```## Prerequisites
* \>= PHP 5.3
* A POSIX compatible operating system (Linux, OSX, BSD)
* POSIX extensions for PHP
* PCNTL extensions for PHP## Usage
```php
setPublicProps([
'name' => $name,
'count' => 2,
'user' => 'root',
]);
}Container::start();
```## Screenshot
![demo1](https://github.com/blogdaren/PHPForker/blob/master/Image/demo1.png)
----
![demo2](https://github.com/blogdaren/PHPForker/blob/master/Image/demo2.png)
----
![demo3](https://github.com/blogdaren/PHPForker/blob/master/Image/demo3.png)
----
![demo4](https://github.com/blogdaren/PHPForker/blob/master/Image/demo4.png)
----
![demo6](https://github.com/blogdaren/PHPForker/blob/master/Image/demo6.png)
----
![demo5](https://github.com/blogdaren/PHPForker/blob/master/Image/demo5.png)## Related links and thanks
* [http://www.blogdaren.com](http://www.blogdaren.com)
* [https://www.workerman.net](https://www.workerman.net)