According to the PHP5 documentation:
Type Hints can only be of the object and array (since PHP 5.1) type. Traditional type hinting with int and string isn’t supported.
Since string and int are not classes, you can’t “type-hint” them in your function.
As of PHP 7.0 declaring argument type as string, int, float, bool is supported.