DBServer::GetVersionInfo PHP Method

GetVersionInfo() private method

private GetVersionInfo ( $v )
    private function GetVersionInfo($v)
    {
        if (preg_match('/^([0-9]+)\\.([0-9]+)[-\\.]?[r]*([0-9]+)?$/si', $v, $matches)) {
            // For SVN: 0.7.11 or 0.9.r565 or 0.2-151
            $verInfo = array_map("intval", array_slice($matches, 1));
            while (count($verInfo) < 3) {
                $verInfo[] = 0;
            }
        } elseif (preg_match('/^([0-9]+)\\.([0-9]+)\\.b([0-9]+)\\.[a-z0-9]+$/si', $v, $matches)) {
            // For GIT: 0.13.b500.57a5ab9
            $verInfo = array_map("intval", array_slice($matches, 1));
            while (count($verInfo) < 3) {
                $verInfo[] = 0;
            }
        } elseif (preg_match('/^([0-9]+)\\.([0-9]+)\\.[0-9]+\\.[0-9]+$/si', $v, $matches)) {
            // For Windows dev builds: 3.5.0.6
            $verInfo = array_map("intval", array_slice($matches, 1));
            while (count($verInfo) < 3) {
                $verInfo[] = 0;
            }
        } else {
            $verInfo = [0, 0, 0];
        }
        return $verInfo;
    }