The following code:
$x = function(string $a) {
};
$data = @file_get_contents("non_existing_file");
if ($data == "")
exit();
$x($data);
Produces the following error:
Parameter #1 $a of closure expects string, string|false given.
But that is not correct as if ($data == "") enters for $data = false, thus there is no way that $x is called with false.
The following code:
Produces the following error:
But that is not correct as
if ($data == "")enters for $data = false, thus there is no way that $x is called with false.