pinga/vizima 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

pinga/vizima

最新稳定版本:v1.0.1

Composer 安装命令:

composer require pinga/vizima

包简介

README 文档

README

StandWithUkraine

SWUbanner

Vizima

Vizima is a high-performance API micro-framework designed to help you create powerful APIs in PHP. This project is a port of the popular Mark framework to Swoole.

Install

composer require pinga/vizima

Usage

# start.php

<?php

require 'vendor/autoload.php';

$app = new \Vizima\App('0.0.0.0', 8080);

$app->get('/', function() {
    return '<h1>Hello, world!</h1>';
});

$app->get('/hello/{name}', function (Swoole\Http\Request $request, $name) {
    return "Hello $name";
});

$app->post('/user/create', function () {
    return json_encode(['code'=>0 ,'message' => 'ok']);
});

$app->start();

Run command php start.php

Going to http://127.0.0.1:3000/hello/world will now display "Hello world".

Benchmark

Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     3.07ms    4.27ms  92.46ms   92.61%
    Req/Sec     2.56k   801.21    17.84k    67.79%
  1221250 requests in 30.10s, 203.82MB read
Requests/sec:  40575.11
Transfer/sec:      6.77MB

Support

If you have any problems, do not heasitate to open an Issue.

统计信息

  • 总下载量: 13
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-03-14