<HTML ><HEAD ><TITLE >php_stream_can_cast</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK REL="HOME" TITLE="PHP Manual" HREF="index.html"><LINK REL="UP" TITLE="Streams Common API Reference" HREF="stream.common-api.html"><LINK REL="PREVIOUS" TITLE="php_stream_cast" HREF="streams.php-stream-cast.html"><LINK REL="NEXT" TITLE="php_stream_is_persistent" HREF="streams.php-stream-is-persistent.html"><META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=ISO-8859-1"></HEAD ><BODY CLASS="refentry" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" >PHP Manual</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="streams.php-stream-cast.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="streams.php-stream-is-persistent.html" ACCESSKEY="N" >Next</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><H1 ><A NAME="streams.php-stream-can-cast" ></A >php_stream_can_cast</H1 ><DIV CLASS="refnamediv" ><A NAME="AEN102412" ></A ><P > (no version information, might be only in CVS)</P >php_stream_can_cast -- Determines if a stream can be converted into another form, such as a FILE* or socket</DIV ><DIV CLASS="refsect1" ><A NAME="AEN102415" ></A ><H2 >Description</H2 >int <B CLASS="methodname" >php_stream_can_cast</B > ( php_stream * stream, int castas)<BR ></BR ><P > This function is equivalent to calling <B CLASS="function" >php_stream_cast()</B > with <TT CLASS="parameter" ><I >ret</I ></TT > set to NULL and <TT CLASS="parameter" ><I >flags</I ></TT > set to 0. It returns <TT CLASS="constant" ><B >SUCCESS</B ></TT > if the stream can be converted into the form requested, or <TT CLASS="constant" ><B >FAILURE</B ></TT > if the conversion cannot be performed. </P ><DIV CLASS="note" ><BLOCKQUOTE CLASS="note" ><P ><B >Note: </B > Although this function will not perform the conversion, some internal stream state *might* be changed by this call. </P ></BLOCKQUOTE ></DIV ><DIV CLASS="note" ><BLOCKQUOTE CLASS="note" ><P ><B >Note: </B > You must explicity compare the return value of this function with one of the constants, as described in <B CLASS="function" >php_stream_cast()</B >. </P ></BLOCKQUOTE ></DIV ><P > See also <B CLASS="function" >php_stream_cast()</B > and <B CLASS="function" >php_stream_is()</B >. </P ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="streams.php-stream-cast.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >Home</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="streams.php-stream-is-persistent.html" ACCESSKEY="N" >Next</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >php_stream_cast</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="stream.common-api.html" ACCESSKEY="U" >Up</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >php_stream_is_persistent</TD ></TR ></TABLE ></DIV ></BODY ></HTML >