示例#1
0
<?php

// index.php
$start = microtime(true);
require_once __DIR__ . '/../vendor/autoload.php';
$app = new \me\adamcameron\misc\app\Application();
$app->run();
$end = microtime(true);
$diff = $end - $start;
$ms = round($diff * 1000);
//echo "Execution duration of request: {$ms}ms";
示例#2
0
<?php

// cli.php
require_once __DIR__ . '/../vendor/autoload.php';
list($_, $method, $path) = $argv;
$app = new \me\adamcameron\misc\app\Application();
$request = \Symfony\Component\HttpFoundation\Request::create($path, $method);
$app->run($request);