Micro application - cannot get started

Hello there,

I'm completely new to Phalcon and I'm stuck at the Micro application tutorial. Here's the code so far:

# public/index.php

use Phalcon\Mvc\Micro;
$app = new Micro();

$app->get('/{name}', function ($name) {


Now if I

$ cd public
$ php -S localhost:8006

And go to http://localhost:8006/foo, here's what I get:

array(1) { [0]=> string(0) "" }

So basically $name is an empty string instead of foo.

What's wrong with this?

PHP 7.1 - Phalcon 3.2.2

Thank you, Ben

edited 16d ago

It's about your nginx/apache config which you didn't provide. Oh wait, there is no apache/nginx. Well then try:

$app = new Micro();


Why not auto detecting that php_sapi_name() == cli-server?

Thank you for your quick reply!