$body = $r -> getResponseBody(); $pr_ent = preg_match('/Rank_.*?:.*?:(\d+)/', $body, $matches); $pr = isset($matches[1]) ? $matches[1] : -1 ;