If the fopencookie synthesis is not desireable, you should query the stream to see if it naturally supports FILE* by using php_stream_is()
참고: If you ask a socket based stream for a FILE*, the streams API will use fdopen() to create it for you. Be warned that doing do may cause data that was buffered in the streams layer to be lost if you intermix streams API calls with ANSI stdio calls.