name = $name; $this->minVersion = $minVersion; } /** * Perform a check of the specification and throw an exception if invalid. * * @throws RuntimeException */ public function check() : void { $version = phpversion($this->name); if (!$version) { throw new RuntimeException("Version number for {$this->name} not available."); } if (version_compare($version, $this->minVersion, '<')) { throw new RuntimeException("The {$this->name} extension version must be" . " greater than {$this->minVersion}, $version given."); } } }