<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <HTML ><HEAD ><TITLE >php_stream_is</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK REL="HOME" TITLE="Manual PHP" HREF="index.html"><LINK REL="UP" TITLE="Streams Common API Reference" HREF="stream.common-api.html"><LINK REL="PREVIOUS" TITLE="php_stream_is_persistent" HREF="streams.php-stream-is-persistent.html"><LINK REL="NEXT" TITLE="php_stream_passthru" HREF="streams.php-stream-passthru.html"><META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=ISO-8859-2"></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" >Manual PHP</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="streams.php-stream-is-persistent.html" ACCESSKEY="P" >Înapoi</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="streams.php-stream-passthru.html" ACCESSKEY="N" >Înainte</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><H1 ><A NAME="streams.php-stream-is" ></A >php_stream_is</H1 ><DIV CLASS="refnamediv" ><A NAME="AEN130203" ></A ><P > (no version information, might be only in CVS)</P >php_stream_is -- Determines if a stream is of a particular type</DIV ><DIV CLASS="refsect1" ><A NAME="AEN130206" ></A ><H2 >Description</H2 >int <B CLASS="methodname" >php_stream_is</B > ( php_stream * stream, int istype)<BR ></BR ><P > <B CLASS="function" >php_stream_is()</B > returns 1 if <VAR CLASS="parameter" >stream</VAR > is of the type specified by <VAR CLASS="parameter" >istype</VAR >, or 0 otherwise. <DIV CLASS="table" ><A NAME="AEN130221" ></A ><P ><B >Tabel 45-1. Values for <VAR CLASS="parameter" >istype</VAR ></B ></P ><TABLE BORDER="1" CLASS="CALSTABLE" ><COL><COL><THEAD ><TR ><TH >Value</TH ><TH >Meaning</TH ></TR ></THEAD ><TBODY ><TR ><TD >PHP_STREAM_IS_STDIO</TD ><TD >The stream is implemented using the stdio implementation</TD ></TR ><TR ><TD >PHP_STREAM_IS_SOCKET</TD ><TD >The stream is implemented using the network socket implementation</TD ></TR ><TR ><TD >PHP_STREAM_IS_USERSPACE</TD ><TD >The stream is implemented using the userspace object implementation</TD ></TR ><TR ><TD >PHP_STREAM_IS_MEMORY</TD ><TD >The stream is implemented using the grow-on-demand memory stream implementation</TD ></TR ></TBODY ></TABLE ></DIV > </P ><DIV CLASS="note" ><BLOCKQUOTE CLASS="note" ><P ><B >Notã: </B > The PHP_STREAM_IS_XXX "constants" are actually defined as pointers to the underlying stream operations structure. If your extension (or some other extension) defines additional streams, it should also declare a PHP_STREAM_IS_XXX constant in it's header file that you can use as the basis of this comparison. </P ></BLOCKQUOTE ></DIV ><DIV CLASS="note" ><BLOCKQUOTE CLASS="note" ><P ><B >Notã: </B > This function is implemented as a simple (and fast) pointer comparison, and does not change the stream state in any way. </P ></BLOCKQUOTE ></DIV ><P > See also <B CLASS="function" >php_stream_cast()</B > and <B CLASS="function" >php_stream_can_cast()</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-is-persistent.html" ACCESSKEY="P" >Înapoi</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >Acasã</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="streams.php-stream-passthru.html" ACCESSKEY="N" >Înainte</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >php_stream_is_persistent</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="stream.common-api.html" ACCESSKEY="U" >Sus</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >php_stream_passthru</TD ></TR ></TABLE ></DIV ></BODY ></HTML >