Returns an array of all currently active resources, optionally
filtered by resource type.
Note:
This function is meant for debugging and testing purposes. It is not supposed
to be used in production environments, especially not to access or even manipulate
resources which are normally not accessible (e.g. the underlying stream resource
of SplFileObject instances).