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?
That can give you a lot of false positives, like for example database resources.
You should use get_resource_type
instead.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With