'; exit(1); } // Ensure the method is a valid HTTP method $method = strtoupper($argv[1]); if (!in_array($method, ['GET', 'POST'])) { echo 'Invalid HTTP method'; exit(1); } $app = new App(new SegmentRouter); $app->get('/', function () { echo "Hello, World!\n"; }); $app->get('/about/:daniel', function ($d) { echo "What about $d?\n"; }); $app->run($method, $argv[2]);