php determine if a variable is an open file handle

php

Solution

That can give you a lot of false positives, like for example database resources.

You should use `get_resource_type` instead.

Problem

i am currently using `is_resource()`to determine whether a variable is an open file handle. Is this correct or is there an alternative (better) way to do this?

Original source