If there are no errors, it prints a "No errors" message to stdout.
If there are errors, it prints a detailed message to stderr. I want only this one.
This would print the error message if one is sent or No error.
if empty.
ERROR=$(exec php -l "foo/bar.php" 2>&1 >/dev/null)
[[ -z $ERROR ]] && ERROR='No error.'
echo "$ERROR"