$url = 'https://mysite.com/aaa/bbb/123_multi.jpg';
$searchStr = '_multi';
$parseUrl = parse_url($url);
$pathInfo = pathinfo($parseUrl['path']);
$a = $parseUrl['scheme'] . '://' . $parseUrl['host'] . $pathInfo['dirname'];
$b = $pathInfo['basename'];
$c = (int)(substr($pathInfo['filename'], -strlen($searchStr)) === $searchStr);