- $local = array_pad(explode('.', $this->localVersion), 3, 0);
- $latest = array_pad(explode('.', $this->latestVersion), 3, 0);
-
- for ($i = 0; $i < 3; $i++) {
- $loc = (int) $local[$i];
- $lat = (int) $latest[$i];
- if ($loc > $lat) {
- return NULL;
- }
- elseif ($loc < $lat) {
- return $this->latestVersion;
- }
+ if (version_compare($this->localVersion, $this->latestVersion) < 0) {
+ return $this->latestVersion;