Specifying a data type for a function parameter will cause PHP to throw a catchable fatal error if you pass a value which is not of that type. Please note though, you can only specify types for classes, and not primitives such as strings or integers.
Most IDE's can infer a data type from a PHPDoc style comment if one is provided. e.g.