It will always return an array, but you can change the template so that it matches only what you want.
$uri = "uri.com/upload/123456789_abc.ext";
preg_match('#(?<=uri\.com/upload/)\d+#is', $uri, $match );
print_r($match);
returns
Array ([0] => 123456789)
so it is still an array, but it only contains a complete match, i.e. your number.
(?<=uri\\.com/upload/) is lookbehind, it does not match this part, so it is not part of the result.
\d+ , _ .