is_executable() already returns true or false

is_executable() function returns TRUE if the filename exists and is executable, or FALSE on error, so you can simplify the code ;)