nlopess Fri Feb 6 12:20:48 2004 EDT
Modified files: /phpdoc/en/appendices migration5.xml Log: new functions and CLI/CGI sections more to come... stay tuned
http://cvs.php.net/diff.php/phpdoc/en/appendices/migration5.xml?r1=1.4&r2=1.5&ty=u Index: phpdoc/en/appendices/migration5.xml diff -u phpdoc/en/appendices/migration5.xml:1.4 phpdoc/en/appendices/migration5.xml:1.5 --- phpdoc/en/appendices/migration5.xml:1.4 Mon Feb 2 10:53:23 2004 +++ phpdoc/en/appendices/migration5.xml Fri Feb 6 12:20:48 2004 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.4 $ --> +<!-- $Revision: 1.5 $ --> <appendix id="migration5"> <title>Migrating from PHP 4 to PHP 5</title> @@ -70,13 +70,30 @@ </itemizedlist> </section> + <section id="migration5.cli-cgi"> + <title>CLI and CGI</title> + <para> + In PHP 5 there were some changes in CLI and CGI filenames. In PHP 5, the + CGI version was renamed to <literal>php-cgi.exe</literal> (previously + <literal>php.exe</literal>) and the CLI version now sits in the main + directory (previously <literal>cli/php.exe</literal>). + </para> + <para> + In PHP 5 it was also introduced a new mode: + <literal>php-win.exe</literal>. This is equal to the CLI version, except + that php-win doesn't output anything and thus provides no console (no "dos + box" appears on the screen). This behavior is similar to php-gtk. + </para> + </section> + <section id="migration5.configuration"> <title>Migrating Configuration Files</title> <para> Since the ISAPI modules changed their names, from php4xxx to php5xxx, you need to make some changes in the configuration files. There were also - changes in the CLI and CGI filenames. Please refer to the corresponding - section for more information. + changes in the CLI and CGI filenames. Please refer to the <link + linkend="migration5.cli-cgi">corresponding section</link> for more + information. </para> <para> Migrate the Apache configuration is extremely easy. See the example below @@ -115,6 +132,257 @@ </para> </section> + <section id="migration5.functions"> + <title>New Functions</title> + <para> + In PHP 5 there are some new functions. Here is the list of them: + </para> + <para>Arrays:</para> + <itemizedlist> + <listitem><simpara> + <function>array_combine</function> - Creates an array by using one array + for keys and another for its values + </simpara></listitem> + <listitem><simpara> + <function>array_diff_uassoc</function> - Computes the difference of + arrays with additional index check which is performed by a user supplied + callback function + </simpara></listitem> + <listitem><simpara> + <function>array_udiff</function> - Computes the difference of arrays by + using a callback function for data comparison + </simpara></listitem> + <listitem><simpara> + <function>array_udiff_assoc</function> - Computes the difference of + arrays with additional index check. The data is compared by using a + callback function + </simpara></listitem> + <listitem><simpara> + <function>array_udiff_uassoc</function> - Computes the difference of + arrays with additional index check. The data is compared by using a + callback function. The index check is done by a callback function also + </simpara></listitem> + <listitem><simpara> + <function>array_walk_recursive</function> - Apply a user function + recursively to every member of an array + </simpara></listitem> + </itemizedlist> + + <para>InterBase:</para> + <itemizedlist> + <listitem><simpara> + <function>ibase_affected_rows</function> - Return the number of rows + that were affected by the previous query + </simpara></listitem> + <listitem><simpara> + <function>ibase_commit_ret</function> - Commit a transaction without + closing it + </simpara></listitem> + <listitem><simpara> + <function>ibase_drop_db</function> - Drops a database + </simpara></listitem> + <listitem><simpara> + <function>ibase_errcode</function> - Return an error code + </simpara></listitem> + <listitem><simpara> + <function>ibase_free_event_handler</function> - Cancels a registered + event handler + </simpara></listitem> + <listitem><simpara> + <function>ibase_gen_id</function> - Increments the named generator and + returns its new value + </simpara></listitem> + <listitem><simpara> + <function>ibase_name_result</function> - Assigns a name to a result set + </simpara></listitem> + <listitem><simpara> + <function>ibase_num_params</function> - Return the number of parameters + in a prepared query + </simpara></listitem> + <listitem><simpara> + <function>ibase_param_info</function> - Return information about a + parameter in a prepared query + </simpara></listitem> + <listitem><simpara> + <function>ibase_set_event_handler</function> - Register a callback + function to be called when events are posted + </simpara></listitem> + <listitem><simpara> + <function>ibase_wait_event</function> - Wait for an event to be posted + by the database + </simpara></listitem> + </itemizedlist> + + <para>iconv:</para> + <itemizedlist> + <listitem><simpara> + <function>iconv_mime_decode</function> - Decodes a MIME header field + </simpara></listitem> + <listitem><simpara> + <function>iconv_mime_decode_headers</function> - Decodes multiple MIME + header fields at once + </simpara></listitem> + <listitem><simpara> + <function>iconv_mime_encode</function> - Composes a MIME header field + </simpara></listitem> + <listitem><simpara> + <function>iconv_strlen</function> - Returns the character count of + string + </simpara></listitem> + <listitem><simpara> + <function>iconv_strpos</function> - Finds position of first occurrence + of a needle within a haystack + </simpara></listitem> + <listitem><simpara> + <function>iconv_strrpos</function> - Finds the last occurrence of a + needle within the specified range of haystack + </simpara></listitem> + <listitem><simpara> + <function>iconv_substr</function> - Cut out part of a string + </simpara></listitem> + </itemizedlist> + + <para>Streams:</para> + <itemizedlist> + <listitem><simpara> + <function>stream_copy_to_stream</function> - Copies data from one stream + to another + </simpara></listitem> + <listitem><simpara> + <function>stream_get_line</function> - Gets line from stream resource up + to a given delimiter + </simpara></listitem> + <listitem><simpara> + <function>stream_socket_accept</function> - Accept a connection on a + socket created by <function>stream_socket_server</function> + </simpara></listitem> + <listitem><simpara> + <function>stream_socket_client</function> - Open Internet or Unix domain + socket connection + </simpara></listitem> + <listitem><simpara> + <function>stream_socket_get_name</function> - Retrieve the name of the + local or remote sockets + </simpara></listitem> + <listitem><simpara> + <function>stream_socket_recvfrom</function> - Receives data from a + socket, connected or not + </simpara></listitem> + <listitem><simpara> + <function>stream_socket_sendto</function> - Sends a message to a socket, + whether it is connected or not + </simpara></listitem> + <listitem><simpara> + <function>stream_socket_server</function> - Create an Internet or Unix + domain server socket + </simpara></listitem> + </itemizedlist> + + <para>Other:</para> + <itemizedlist> + <listitem><simpara> + <function>convert_uudecode</function> - decode a uuencoded string + </simpara></listitem> + <listitem><simpara> + <function>convert_uuencode</function> - uuencode a string + </simpara></listitem> + <listitem><simpara> + <function>dba_key_split</function> - Splits a key in string + representation into array representation + </simpara></listitem> + <listitem><simpara> + <function>dbase_get_header_info</function> - Get the header info of a + dBase database + </simpara></listitem> + <listitem><simpara> + <function>file_put_contents</function> - Write a string to a file + </simpara></listitem> + <listitem><simpara> + <function>ftp_alloc</function> - Allocates space for a file to be + uploaded + </simpara></listitem> + <listitem><simpara> + <function>get_headers</function> - Fetches all the headers sent by the + server in response to a HTTP request + </simpara></listitem> + <listitem><simpara> + <function>headers_list</function> - Returns a list of response headers + sent (or ready to send) + </simpara></listitem> + <listitem><simpara> + <function>http_build_query</function> - Generate URL-encoded query string + </simpara></listitem> + <listitem><simpara> + <function>idate</function> - Format a local time/date as integer + </simpara></listitem> + <listitem><simpara> + <function>image_type_to_extension</function> - Get file extension for + image-type returned by <function>getimagesize</function>, + <function>exif_read_data</function>, + <function>exif_thumbnail</function>, + <function>exif_imagetype</function> + </simpara></listitem> + <listitem><simpara> + <function>imap_getacl</function> - Gets the ACL for a given mailbox + </simpara></listitem> + <listitem><simpara> + <function>ldap_sasl_bind</function> - Bind to LDAP directory using SASL + </simpara></listitem> + <listitem><simpara> + <function>pcntl_getpriority</function> - Get the priority of any + process + </simpara></listitem> + <listitem><simpara> + <function>pcntl_wait</function> - Waits on or returns the status of a + forked child as defined by the waitpid() system call + </simpara></listitem> + <listitem><simpara> + <function>pg_version</function> - Returns an array with client, protocol + and server version (when available) + </simpara></listitem> + <listitem><simpara> + <function>php_check_syntax</function> - Check the syntax of the + specified file + </simpara></listitem> + <listitem><simpara> + <function>php_strip_whitespace</function> - Return source with stripped + comments and whitespace + </simpara></listitem> + <listitem><simpara> + <function>proc_nice</function> - Change the priority of the current + process + </simpara></listitem> + <listitem><simpara> + <function>setrawcookie</function> - Send a cookie with no url encoding + of the value + </simpara></listitem> + <listitem><simpara> + <function>snmp_read_mib</function> - Reads and parses a MIB file into + the active MIB tree + </simpara></listitem> + <listitem><simpara> + <function>sqlite_fetch_column_types</function> - Return an array of + column types from a particular table + </simpara></listitem> + <listitem><simpara> + <function>str_split</function> - Convert a string to an array + </simpara></listitem> + <listitem><simpara> + <function>strpbrk</function> - Search a string for any of a set of + characters + </simpara></listitem> + <listitem><simpara> + <function>substr_compare</function> - Binary safe optionally case + insensitive comparison of two strings from an offset, up to length + characters + </simpara></listitem> + <listitem><simpara> + <function>time_nanosleep</function> - Delay for a number of seconds and + nano seconds + </simpara></listitem> + </itemizedlist> + </section> + </appendix>