In the first example, you are passing the result of an expression to empty, which is not allowed.
From the [man]empty[/man] manual page:
"Note: empty() only checks variables as anything else will result in a parse error. In otherwords, the following will not work: empty(addslashes($name))."
Some other things only accept variables and not expressions. For example, functions that are defined to pass arguments by reference can't accept an expression.