PHP Function Reference

PHP streamWrapper stream_cast() Method



The PHP streamWrapper::stream_cast() method retrieves the underlying resource. This method is called in response to stream_select() function.

Syntax

public streamWrapper::stream_cast(cast_as)

Parameters

cast_as Required. It can be STREAM_CAST_FOR_SELECT when stream_select() is calling stream_cast() or STREAM_CAST_AS_STREAM when stream_cast() is called for other uses.

Return Value

Returns the underlying stream resource used by the wrapper, or false.


❮ PHP Streams Reference