I have a file descriptor (edit: the resource returned by fopen on a stream that is not necessarily a local file) that is being passed into a black box. When it pops out, is it possible to determine with any certainty whether or not the descriptor has been closed?
Edit:
It looks like the function get_resource_type($fd) will return "Unknown" on a closed resource. Does anyone know if that holds true for most versions of PHP?