<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE >New Functions</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK REL="HOME" TITLE="Manual do PHP" HREF="index.html"><LINK REL="UP" TITLE="Migrating from PHP 5.1.x to PHP 5.2.x" HREF="migration52.html"><LINK REL="PREVIOUS" TITLE="New Parameters" HREF="migration52.parameters.html"><LINK REL="NEXT" TITLE="New Methods" HREF="migration52.methods.html"><META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=UTF-8"></HEAD ><BODY CLASS="section" 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 do PHP</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="migration52.parameters.html" ACCESSKEY="P" >Anterior</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" >Apêndice B. Migrating from PHP 5.1.x to PHP 5.2.x</TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="migration52.methods.html" ACCESSKEY="N" >Próxima</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="migration52.functions" >New Functions</A ></H1 ><P > PHP 5.2.x introduced some new functions: </P ><P >PHP Core:</P ><P ></P ><UL ><LI ><P > <A HREF="function.array-fill-keys.html" ><B CLASS="function" >array_fill_keys()</B ></A > - Create an array using the elements of the first parameter as keys, each initialized to val </P ></LI ><LI ><P > <A HREF="function.error-get-last.html" ><B CLASS="function" >error_get_last()</B ></A > - Get the last occurred error as associative array. Returns <TT CLASS="constant" ><B >NULL</B ></TT > if there hasn't been an error yet </P ></LI ><LI ><P > <A HREF="function.image-type-to-extension.html" ><B CLASS="function" >image_type_to_extension()</B ></A > - Get file extension for image-type returned by getimagesize, exif_read_data, exif_thumbnail, exif_imagetype </P ></LI ><LI ><P > <A HREF="function.memory-get-peak-usage.html" ><B CLASS="function" >memory_get_peak_usage()</B ></A > - Returns the peak allocated by PHP memory </P ></LI ><LI ><P > <A HREF="function.timezone-abbreviations-list.html" ><B CLASS="function" >timezone_abbreviations_list()</B ></A > - Returns associative array containing DST, offset and the timezone name </P ></LI ><LI ><P > <A HREF="function.timezone-identifiers-list.html" ><B CLASS="function" >timezone_identifiers_list()</B ></A > - Returns numerically indexed array with all timezone identifiers </P ></LI ><LI ><P > <A HREF="function.timezone-name-from-abbr.html" ><B CLASS="function" >timezone_name_from_abbr()</B ></A > - Returns the timezone name from abbreviation </P ></LI ><LI ><P > <A HREF="function.stream-socket-shutdown.html" ><B CLASS="function" >stream_socket_shutdown()</B ></A > - Causes all or part of a full-duplex connection on the socket associated with stream to be shut down. As of PHP 5.2.1. </P ></LI ></UL ><P ><A HREF="ref.mbstring.html" >mbstring</A >:</P ><P ></P ><UL ><LI ><P > <A HREF="function.mb-list-encodings-alias-names.html" ><B CLASS="function" >mb_list_encodings_alias_names()</B ></A > - Returns an array of all supported entity encodings </P ></LI ><LI ><P > <A HREF="function.mb-list-mime-names.html" ><B CLASS="function" >mb_list_mime_names()</B ></A > - Returns an array or string of all supported mime names </P ></LI ><LI ><P > <A HREF="function.mb-stripos.html" ><B CLASS="function" >mb_stripos()</B ></A > - Finds position of first occurrence of a string within another, case insensitive </P ></LI ><LI ><P > <A HREF="function.mb-stristr.html" ><B CLASS="function" >mb_stristr()</B ></A > - Finds first occurrence of a string within another, case insensitive </P ></LI ><LI ><P > <A HREF="function.mb-strrchr.html" ><B CLASS="function" >mb_strrchr()</B ></A > - Finds the last occurrence of a character in a string within another </P ></LI ><LI ><P > <A HREF="function.mb-strrichr.html" ><B CLASS="function" >mb_strrichr()</B ></A > - Finds the last occurrence of a character in a string within another, case insensitive </P ></LI ><LI ><P > <A HREF="function.mb-strripos.html" ><B CLASS="function" >mb_strripos()</B ></A > - Finds position of last occurrence of a string within another, case insensitive </P ></LI ><LI ><P > <A HREF="function.mb-strstr.html" ><B CLASS="function" >mb_strstr()</B ></A > - Finds first occurrence of a string within another </P ></LI ></UL ><P ><A HREF="ref.ming.html" >ming</A > (As of PHP 5.2.1):</P ><P ></P ><UL ><LI ><P > void ming_setSWFCompression(int num) - Sets output compression </P ></LI ><LI ><P > void swfmovie::namedanchor(string name) - Creates anchor </P ></LI ><LI ><P > void swfmovie::protect([string pasword]) - Protects </P ></LI ></UL ><P ><A HREF="ref.openssl.html" >openssl</A >:</P ><P ></P ><UL ><LI ><P > <A HREF="function.openssl-csr-get-public-key.html" ><B CLASS="function" >openssl_csr_get_public_key()</B ></A > - Extracts public key from a CERT and prepares it for use </P ></LI ><LI ><P > <A HREF="function.openssl-csr-get-subject.html" ><B CLASS="function" >openssl_csr_get_subject()</B ></A > - Returns the subject of a CERT </P ></LI ><LI ><P > <A HREF="function.openssl-pkey-get-details.html" ><B CLASS="function" >openssl_pkey_get_details()</B ></A > - Returns an array with the key details (bits, pkey, type) </P ></LI ></UL ><P ><A HREF="ref.spl.html" >spl</A >:</P ><P ></P ><UL ><LI ><P > <A HREF="function.spl-object-hash.html" ><B CLASS="function" >spl_object_hash()</B ></A > - Return hash id for given object </P ></LI ><LI ><P > int iterator_apply(Traversable it, mixed function [, mixed params]) - Calls a function for every element in an iterator </P ></LI ></UL ><P ><A HREF="ref.pcre.html" >pcre</A >:</P ><P ></P ><UL ><LI ><P > <A HREF="function.preg-last-error.html" ><B CLASS="function" >preg_last_error()</B ></A > - Returns the error code of the last regex execution </P ></LI ></UL ><P ><A HREF="ref.pgsql.html" >pgsql</A >:</P ><P ></P ><UL ><LI ><P > <A HREF="function.pg-field-table.html" ><B CLASS="function" >pg_field_table()</B ></A > - Returns the name of the table field belongs to, or table's oid if oid_only is true </P ></LI ></UL ><P ><A HREF="ref.posix.html" >posix</A >:</P ><P ></P ><UL ><LI ><P > bool posix_initgroups(string name, int base_group_id) - Calculate the group access list for the user specified in name </P ></LI ></UL ><P ><A HREF="ref.gmp.html" >gmp</A >:</P ><P ></P ><UL ><LI ><P > <A HREF="function.gmp-nextprime.html" ><B CLASS="function" >gmp_nextprime()</B ></A > - Finds next prime of a </P ></LI ></UL ><P ><A HREF="ref.xmlwriter.html" >xmlwriter</A >:</P ><P ></P ><UL ><LI ><P > <A HREF="function.xmlwriter-full-end-element.html" ><B CLASS="function" >xmlwriter_full_end_element()</B ></A > - End current element - returns FALSE on error </P ></LI ><LI ><P > <A HREF="function.xmlwriter-write-raw.html" ><B CLASS="function" >xmlwriter_write_raw()</B ></A > - Write text - returns FALSE on error </P ></LI ><LI ><P > <A HREF="function.xmlwriter-start-dtd-entity.html" ><B CLASS="function" >xmlwriter_start_dtd_entity()</B ></A > - Create start DTD Entity - returns FALSE on error </P ></LI ><LI ><P > <A HREF="function.xmlwriter-end-dtd-entity.html" ><B CLASS="function" >xmlwriter_end_dtd_entity()</B ></A > - End current DTD Entity - returns FALSE on error </P ></LI ><LI ><P > <A HREF="function.xmlwriter-write-dtd-entity.html" ><B CLASS="function" >xmlwriter_write_dtd_entity()</B ></A > - Write full DTD Entity tag - returns FALSE on error </P ></LI ></UL ></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="migration52.parameters.html" ACCESSKEY="P" >Anterior</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >Principal</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="migration52.methods.html" ACCESSKEY="N" >Próxima</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >New Parameters</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="migration52.html" ACCESSKEY="U" >Acima</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >New Methods</TD ></TR ></TABLE ></DIV ></BODY ></HTML >