<HTML ><HEAD ><TITLE >stream_filter_prepend</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="Stream functions" HREF="ref.stream.html"><LINK REL="PREVIOUS" TITLE="stream_filter_append" HREF="function.stream-filter-append.html"><LINK REL="NEXT" TITLE="stream_get_filters" HREF="function.stream-get-filters.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="function.stream-filter-append.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="function.stream-get-filters.html" ACCESSKEY="N" >Next</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><H1 ><A NAME="function.stream-filter-prepend" ></A >stream_filter_prepend</H1 ><DIV CLASS="refnamediv" ><A NAME="AEN88433" ></A ><P > (PHP 4 >= 4.3.0)</P >stream_filter_prepend -- Attach a filter to a stream.</DIV ><DIV CLASS="refsect1" ><A NAME="AEN88436" ></A ><H2 >Description</H2 >bool <B CLASS="methodname" >stream_filter_prepend</B > ( resource stream, string filtername [, string params])<BR ></BR ><P > Adds <TT CLASS="parameter" ><I >filtername</I ></TT > to the list of filters attached to <TT CLASS="parameter" ><I >stream</I ></TT >. This filter will be added with the specified <TT CLASS="parameter" ><I >params</I ></TT > to the <SPAN CLASS="emphasis" ><I CLASS="emphasis" >beginning</I ></SPAN > of the list and will therefore be called first during stream opperations. To add a filter to the end of the list, use <A HREF="function.stream-filter-append.html" ><B CLASS="function" >stream_filter_append()</B ></A >. </P ><DIV CLASS="note" ><BLOCKQUOTE CLASS="note" ><P ><B >Note: </B > <A HREF="function.stream-register-filter.html" ><B CLASS="function" >stream_register_filter()</B ></A > must be called first in order to register the desired user filter to <TT CLASS="parameter" ><I >filtername</I ></TT >. </P ></BLOCKQUOTE ></DIV ><P > See Also: <A HREF="function.stream-register-filter.html" ><B CLASS="function" >stream_register_filter()</B ></A >, and <A HREF="function.stream-filter-append.html" ><B CLASS="function" >stream_filter_append()</B ></A > </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="function.stream-filter-append.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="function.stream-get-filters.html" ACCESSKEY="N" >Next</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >stream_filter_append</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="ref.stream.html" ACCESSKEY="U" >Up</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >stream_get_filters</TD ></TR ></TABLE ></DIV ></BODY ></HTML >