Regardless of the success of the call, stream is undefined and should not be used after a call to this function.
php_stream_close() returns 0 if the stream was closed or EOF to indicate an error. Regardless of the success of the call, stream is undefined and should not be used after a call to this function.