Feature request
I think phpstan should have a better idea about the type $matches has after a preg_match or preg_match_all call.
atm it seems it is always inferred as mixed.
it should at least know that we are only dealing with strings in $matches
I just leave it here as a feature request (so I don't forget), as I did not thought yet about the details.
maybe we can get some inspiration about types in https://github.com/composer/pcre