function dotest($m, $p = null) { $server = new JsonServer(); if (!$p) { $p = JsonServer::getMethodLastCallParam($m); } echo "method {$m}\n"; echo "The params are these as follow:\n"; print_r($p); echo "The response are these as follow:\n"; print_r($server->doRequest($m, $p)); echo "===============================================\n\n"; }
function dotest($m, $p = null) { $server = new JsonServer(); if (!$p) { $p = JsonServer::getMethodLastCallParam($m); } if (!$p) { echo "WARN:{$m} :param is null\n"; return; } record_time($st); $r = $server->doRequest($m, $p); if (!$r || !$r['s']) { echo "FAIL:{$m} :func error\n"; } record_time($st, $m); }