Skip to content
/ mark Public
forked from passwalls/mark

Probably the fastest web micro framework for PHP in the world.

Notifications You must be signed in to change notification settings

rab-dev/mark

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 

Repository files navigation

Mark is a high performance micro framework based on workerman helps you quickly write APIs with php.

Probably the fastest PHP web framework in the world. See the-benchmarker.

Install

It's recommended that you use Composer to install Mark.

composer require mark-php/mark

Usage

start.php

<?php
use Mark\App;

require 'vendor/autoload.php';

$api = new App('http://0.0.0.0:3000');

$api->count = 4; // process count

$api->any('/', function ($requst) {
    return 'Hello world';
});

$api->get('/hello/{name}', function ($requst, $name) {
    return "Hello $name";
});

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

$api->start();

Run command php start.php start -d

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

Benchmark

https://github.com/the-benchmarker/web-frameworks#results

Available commands

php start.php restart -d
php start.php stop
php start.php status
php start.php connections

License

The Mark Framework is licensed under the MIT license. See License File for more information.

About

Probably the fastest web micro framework for PHP in the world.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%