I would do it as an array. Have one element for the pointer and another element for the name of the file...
$file['name'] = 'somefile';
$file['pointer'] = fopen($file['name'], 'r');
and then when you pass $file to the close_file function you made, you'll have both the name and the pointer.
fclose($file['name']);
echo $file['name']." closed\n";