Type hinting is used in PHP when there is a requirement to explicitly define the data type of an argument when passing it through a function.
When this function is first called, PHP will run a quick check to analyze the presence of all the data types that are specified. If it is different, then the runtime will stop as an exception will be raised.
Next up you have to understand how to connect a URL with PHP.