Sophie

Sophie

distrib > Mandriva > 2008.1 > i586 > by-pkgid > fedef0ce54a3761fc1862157672b700c > files > 3804

php-manual-ar-5.1.6-1mdv2008.1.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML
><HEAD
><TITLE
>Resource</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
REL="HOME"
TITLE="PHP Handleiding"
HREF="index.html"><LINK
REL="UP"
TITLE="Types"
HREF="language.types.html"><LINK
REL="PREVIOUS"
TITLE="Objects"
HREF="language.types.object.html"><LINK
REL="NEXT"
TITLE="NULL"
HREF="language.types.null.html"><META
HTTP-EQUIV="Content-type"
CONTENT="text/html; charset=ISO-8859-1"></HEAD
><BODY
CLASS="sect1"
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 Handleiding</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="language.types.object.html"
ACCESSKEY="P"
>Terug</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>Hoofdstuk 6. Types</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="language.types.null.html"
ACCESSKEY="N"
>Volgende</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="sect1"
><H1
CLASS="sect1"
><A
NAME="language.types.resource"
>Resource</A
></H1
><P
>&#13;     A resource is a special variable, holding
     a reference to an external resource. Resources
     are created and used by special functions.
     See the <A
HREF="resource.html"
>appendix</A
> 
     for a listing of all these
     functions and the corresponding resource types.
    </P
><DIV
CLASS="note"
><BLOCKQUOTE
CLASS="note"
><P
><B
>Opmerking: </B
>
      The resource type was introduced in PHP 4
     </P
></BLOCKQUOTE
></DIV
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
NAME="language.types.resource.casting"
>Converting to resource</A
></H2
><P
>&#13;     As resource types hold special handlers to opened
     files, database connections, image canvas areas and
     the like, you cannot convert any value to a resource.
    </P
></DIV
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
NAME="language.types.resource.self-destruct"
>Freeing resources</A
></H2
><P
>&#13;     Due to the reference-counting system introduced
     with PHP 4's Zend Engine, it is automatically detected
     when a resource is no longer referred to (just
     like Java). When this is
     the case, all resources that were in use for this 
     resource are made free by the garbage collector.
     For this reason, it is rarely ever necessary to
     free the memory manually by using some free_result
     function.
     <DIV
CLASS="note"
><BLOCKQUOTE
CLASS="note"
><P
><B
>Opmerking: </B
>
       Persistent database links are special, they 
       are <SPAN
CLASS="emphasis"
><I
CLASS="emphasis"
>not</I
></SPAN
> destroyed by the 
       garbage collector. See also the section about <A
HREF="features.persistent-connections.html"
>persistent 
       connections</A
>.
      </P
></BLOCKQUOTE
></DIV
>
    </P
></DIV
></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="language.types.object.html"
ACCESSKEY="P"
>Terug</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Begin</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="language.types.null.html"
ACCESSKEY="N"
>Volgende</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Objects</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="language.types.html"
ACCESSKEY="U"
>Omhoog</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>NULL</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>