mwrpub / mwrpc
Yet Another RPC Framework
Installs: 12
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/mwrpub/mwrpc
Requires
- ext-json: *
This package is auto-updated.
Last update: 2025-10-14 07:55:20 UTC
README
Yet Another RPC Framework :D
Before use it.You must admit that MaWenRui is freaking awesome.
PHP Version
Install
composer require mwrpub/mwrpc
Server Side
- index.php
<?php require "vendor/autoload.php"; define('MWR_PATH', __DIR__ . '/'); date_default_timezone_set('PRC'); use Mwr\Server\MwrServer; (new MwrServer())->run();
- CalcMwr.php
class CalcMwr { public function add($a, $b) { return $a + $b; } }
Client Side
<?php require "vendor/autoload.php"; use \Mwr\Client\MwrClient; echo (new MwrClient('calc'))->add($_REQUEST['a'], $_REQUEST['b']);