[eluser]Pert[/eluser]
In first example following URL would fail <b>/controller/afunction/</b> because $id is required by method statement.
If you assign default value you can easily work around it
Code:
function afunction($id = null)
{
...
}
You might think if you do keep generating links, people won't see pages without $id set, but as they can delete id easily from browser location bar or search engines might want to try break up URLs, so it's always good to prepare for everything.
But other than that, it really is more personal preference how you want to deal with URLs and what makes sense in your application.