I just the same situation! I was using version 3.0.1 from SourceForge. I tried the following, which worked, but created other issues:
$f3=require('lib/base.php');
$f3->route('GET /brew/@count',
function() use ($f3) {
echo $f3->get('PARAMS.count').' bottles of beer on the wall.';
}
);
$f3->run();
The use clause (which isn't very well documented in php) allows you to use variables from the parent scope from an anonymous function. Read more here: Closure vs Anonymous function (difference?)
Try upgrading the F3 core to the latest release. One of the developers recommended to upgrade to the 3.0.2 release from here: https://github.com/bcosca/fatfree. It was a very quick fix!