code: private function isValidFullPath(string $path): bool
      {
          $valid = false;
          if ('/' === substr($path, 0, 1) && is_executable($path)) {
              $valid = true;
          }
  
          return $valid;
      }
docs: Returns true if the path points to an executable file.