Note that you are not supposed to use square brackets around $lang=false. $lang=false is the default value, you can optionally use a language code, e.g. $site->url('en') like in the second example above.
Why are there square brackets in the documentation, then? In this context, square brackets are used to indicate that a parameter is optional.