So, int cannot be part of a intersection type, nor can string, both being scalar.
Yet, there is a notion of numeric string, in #PHP, where this structure could fit. It would be a int (hence, a string), or a string that can convert to int.
What do you think?
Open Source PHP Static Code Analysis