What is the purpose of using Typehint in the use() function in PHP?
When using the `use()` function in PHP, we can specify the data type of the variable being passed to the closure function by using Typehint. This helps to ensure that the correct type of data is being passed to the closure function, preventing potential errors or unexpected behavior.
$var = 'Hello';
$func = function(string $input) use ($var) {
echo $input;
};
$func('World'); // Output: World