nlopess Mon Feb 23 11:31:35 2004 EDT
Modified files:
/phpdoc/en/appendices migration5.xml
Log:
first beta release of the migration chapter :)
http://cvs.php.net/diff.php/phpdoc/en/appendices/migration5.xml?r1=1.8&r2=1.9&ty=u
Index: phpdoc/en/appendices/migration5.xml
diff -u phpdoc/en/appendices/migration5.xml:1.8 phpdoc/en/appendices/migration5.xml:1.9
--- phpdoc/en/appendices/migration5.xml:1.8 Thu Feb 19 11:06:55 2004
+++ phpdoc/en/appendices/migration5.xml Mon Feb 23 11:31:34 2004
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.8 $ -->
+<!-- $Revision: 1.9 $ -->
<appendix id="migration5">
<title>Migrating from PHP 4 to PHP 5</title>
@@ -70,6 +70,45 @@
Classes must be declared before used.
</simpara></listitem>
</itemizedlist>
+
+ <para>
+ <example>
+ <title><function>strrpos</function> and <function>strripos</function> now
+ use the entire string as a needle</title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+var_dump(strrpos('ABCDEF','DEF')); //int(3)
+
+var_dump(strrpos('ABCDEF','DAF')); //bool(false)
+?>
+]]>
+ </programlisting>
+ </example>
+ </para>
+ <para>
+ The following example was valid in PHP 4, although it will produce a fatal
+ error in PHP 5.
+ </para>
+ <para>
+ <example>
+ <title>Classes must be declared before used</title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+$test = new fubar();
+$test->barfu();
+
+class fubar {
+ function barfu() {
+ echo 'fubar';
+ }
+}
+?>
+]]>
+ </programlisting>
+ </example>
+ </para>
</section>
<section id="migration5.cli-cgi">
@@ -189,6 +228,10 @@
closing it
</simpara></listitem>
<listitem><simpara>
+ <function>ibase_db_info</function> - Request statistics about a
+ database
+ </simpara></listitem>
+ <listitem><simpara>
<function>ibase_drop_db</function> - Drops a database
</simpara></listitem>
<listitem><simpara>
@@ -203,6 +246,10 @@
returns its new value
</simpara></listitem>
<listitem><simpara>
+ <function>ibase_maintain_db</function> - Execute a maintenance command
+ on the database server
+ </simpara></listitem>
+ <listitem><simpara>
<function>ibase_name_result</function> - Assigns a name to a result set
</simpara></listitem>
<listitem><simpara>
@@ -218,6 +265,14 @@
service manager and returns immediately
</simpara></listitem>
<listitem><simpara>
+ <function>ibase_rollback_ret</function> - Rollback transaction and
+ retain the transaction context
+ </simpara></listitem>
+ <listitem><simpara>
+ <function>ibase_server_info</function> - Request statistics about a
+ database
+ </simpara></listitem>
+ <listitem><simpara>
<function>ibase_service_attach</function> - Connect to the service manager
</simpara></listitem>
<listitem><simpara>
@@ -315,6 +370,10 @@
dBase database
</simpara></listitem>
<listitem><simpara>
+ <function>dbx_fetch_row</function> - Fetches rows from a query-result
+ that had the DBX_RESULT_UNBUFFERED flag set
+ </simpara></listitem>
+ <listitem><simpara>
<function>file_put_contents</function> - Write a string to a file
</simpara></listitem>
<listitem><simpara>
@@ -347,6 +406,10 @@
<function>exif_imagetype</function>
</simpara></listitem>
<listitem><simpara>
+ <function>imagefilter</function> - Applies Filter an image using a
+ custom angle
+ </simpara></listitem>
+ <listitem><simpara>
<function>imap_getacl</function> - Gets the ACL for a given mailbox
</simpara></listitem>
<listitem><simpara>
@@ -377,6 +440,14 @@
process
</simpara></listitem>
<listitem><simpara>
+ <function>pspell_config_data_dir</function> - Change location of
+ language data files
+ </simpara></listitem>
+ <listitem><simpara>
+ <function>pspell_config_dict_dir</function> - Change location of the
+ main word list
+ </simpara></listitem>
+ <listitem><simpara>
<function>setrawcookie</function> - Send a cookie with no url encoding
of the value
</simpara></listitem>
@@ -438,6 +509,39 @@
</itemizedlist>
</section>
+ <section id="migration5.databases">
+ <title>Databases</title>
+ <para>
+ There were some changes in PHP 5 regarding databases (MySQL and SQLite).
+ </para>
+ <para>
+ In PHP 5 the MySQL client libraries are not bundled, because of licence
+ problems and some others. For more information, read the <link
+ linkend="faq.databases.mysql.php5">FAQ entry</link>.
+ </para>
+ <para>
+ There is also a new extension, <link linkend="ref.mysqli">MySQLi (Improved
+ MySQL)</link>, which is designed to work with MySQL 4.1 and above.
+ </para>
+ <para>
+ Since PHP 5, the <link linkend="ref.sqlite">SQLite</link> extension is
+ built-in PHP. SQLite is embeddable SQL database engine and is not a
+ client library used to connect to a big database server (like MySQL or
+ PostgreSQL). The SQLite library reads and writes directly to and from the
+ database files on disk.
+ </para>
+ </section>
+
+ <section id='migration5.oop'>
+ <title>New Object Model</title>
+ <para>
+ In PHP 5 there is a new Object Model. PHP's handling of objects has been
+ completely rewritten, allowing for better performance and more features.
+ Please read <ulink
+
url="http://www.php.net/zend-engine-2.php">http://www.php.net/zend-engine-2.php</ulink>
+ for more info.
+ </para>
+ </section>
</appendix>