After stream has been closed, it 's value is undefined and should not be used.
php_stream_close() safely closes stream and releases the resources associated with it. After stream has been closed, it's value is undefined and should not be used.