Why isn't the function is_null accurate with $_FILES?
<p>I want to test if the user selected a file or not , so I tested if <code>$_FILES['input_name']['name']</code> is not null. </p>

<p>I used the PHP function <code>is_null($_FILES['input_name']['name'])</code> but the code goes to the statements where it's supposed a file was selected ! </p>

<p>So I replaced my test with <code>$_FILES['input_name']['name'] != ""</code> .</p>

<p>So why isn't <code>is_null</code> accurate with $_FILES['name'] ?</p>
