PHP版的Node.js React

码农软件 · 软件分类 · 高性能网络开发库 · 2019-09-02 07:28:05

软件介绍

React (Node.PHP) 是一个 PHP 开发的平台,用于构建快速、可伸缩的网络应用,可用于事件驱动的、无堵塞的 I/O 模型,特点是轻量级而且高效率,特别适合用于数据敏感的实时应用交互。

示例代码:

require 'vendor/autoload.php';
$stack = new React\Espresso\Stack(function ($request, $response) {
    $response->writeHead(200, array('Content-Type' => 'text/plain'));
    $response->end("Hello World\n");
});
echo "Server running at http://127.0.0.1:1337\n";
$stack->listen(1337);

 

运行方法:

% php example.php
Server running at http://127.0.0.1:1337

 

本文地址:https://codercto.com/soft/d/13690.html

Reality Is Broken

Reality Is Broken

Jane McGonigal / Penguin Press HC, The / 2011-1-20 / USD 26.95

Visionary game designer Jane McGonigal reveals how we can harness the power of games to solve real-world problems and boost global happiness. More than 174 million Americans are gamers, and......一起来看看 《Reality Is Broken》 这本书的介绍吧!

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具

图片转BASE64编码
图片转BASE64编码

在线图片转Base64编码工具

UNIX 时间戳转换
UNIX 时间戳转换

UNIX 时间戳转换