== EDIT ==
This is no longer true for PHP >= 5.5!
What I sometimes run into is the Fatal error: Can't use function
return value in write context
error when using the empty()
construct. For example:
if (!empty(trim($_GET['s']))) {
// ...
}
empty()
needs a variable, anything else will result in the error.
The solution:
$s = trim($_GET['s']);
if (!empty($s)) {
// ...
}