public function getResourceId($resource): string
    {
        if (is_resource($resource)) {
            $data = stream_get_meta_data($resource);
            $resource = $data['wrapper_data'];
        }

        return spl_object_hash($resource);
    }
public function getResourceId($resource): string
    {
        if (is_resource($resource)) {
            $data = stream_get_meta_data($resource);
            $resource = $data['wrapper_data'];
        }

        return spl_object_hash($resource);
    }
public function getResourceId ( $ resource ) : string { if ( is_resource ( $ resource ) ) { $ data = stream_get_meta_data ( $ resource ) ; $ resource = $ data [ 'wrapper_data' ] ; } return spl_object_hash ( $ resource ) ; }
Returns unique resource id

@param   resource|vfsStreamWrapper $resource
@return  string
@see     https://github.com/mikey179/vfsStream/issues/40
Returns unique resource id