protected function isLegacyDrush() {
    try {
      // Try for a drush 9 version.
      $version = trim($this->drush('version', [], ['format' => 'string']));
      return version_compare($version, '9', '<=');
    }
    catch (\RuntimeException $e) {
      // The version of drush is old enough that only `--version` was available,
      // so this is a legacy version.
      return TRUE;
    }
  }
protected function isLegacyDrush() {
    try {
      // Try for a drush 9 version.
      $version = trim($this->drush('version', [], ['format' => 'string']));
      return version_compare($version, '9', '<=');
    }
    catch (\RuntimeException $e) {
      // The version of drush is old enough that only `--version` was available,
      // so this is a legacy version.
      return TRUE;
    }
  }
protected function isLegacyDrush ( ) { try { // Try for a drush 9 version. $ version = trim ( $ this -> drush ( 'version' , [ ] , [ 'format' => 'string' ] ) ) ; return version_compare ( $ version , '9' , '<=' ) ; } catch ( \ RuntimeException $ e ) { // The version of drush is old enough that only `--version` was available, // so this is a legacy version. return TRUE ; } }
Determine if drush is a legacy version.

@return bool
Returns TRUE if drush is older than drush 9.
Determine if drush is a legacy version .