How to emulate standard front-controller behaviour of routing static assets statically, otherwise calling index.php using the PHP 5.4 built-in server:

// file: index.php
// Route static assets from CLI server
if (PHP_SAPI === 'cli-server') {
    if (file_exists(__DIR__ . $_SERVER['REQUEST_URI']) and !is_dir(__DIR__ . $_SERVER['REQUEST_URI'])) {
        return false;
    }
}

// do usual front-controller stuff