protected function getMessageSectionSize($response) { $size = 0; preg_match('/\\{(.*)\\}/', $response, $matches); if (count($matches) > 0) { $size = (int) $matches[1]; } return $size; }