mirror of
https://github.com/macintoshplus/doc-en.git
synced 2026-04-25 17:48:14 +02:00
da4c2145ac
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@166233 c90b9560-bf6c-de11-be94-00142212c4b1
124 lines
4.0 KiB
XML
Executable File
124 lines
4.0 KiB
XML
Executable File
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<!-- $Revision: 1.3 $ -->
|
|
<chapter id="faq.migration5">
|
|
<title>Migrating from PHP 4 to PHP 5</title>
|
|
<titleabbrev>Migrating from PHP 4 to PHP 5</titleabbrev>
|
|
|
|
<para>
|
|
This faq section will help you migrate from PHP 4 to PHP 5.
|
|
</para>
|
|
|
|
<qandaset>
|
|
<qandaentry id="faq.migration5.php45">
|
|
<question>
|
|
<para>
|
|
Migrating from PHP 4 to PHP 5
|
|
</para>
|
|
</question>
|
|
<answer>
|
|
<para>
|
|
Although PHP 5 offers many new features, it's designed to be as
|
|
compatible with earlier versions of PHP as possible with little
|
|
functionality being broken in the process.
|
|
</para>
|
|
<para>
|
|
Be sure to read the appropriate <link linkend="migration5">PHP 5
|
|
migration appendix</link> of this manual as it contains even more
|
|
information on the topic of migrating to PHP 5.
|
|
</para>
|
|
</answer>
|
|
</qandaentry>
|
|
|
|
<qandaentry id="faq.migration5.mysql">
|
|
<question>
|
|
<para>
|
|
Does MySQL work in PHP 5? It seemed to have disappeared.
|
|
</para>
|
|
</question>
|
|
<answer>
|
|
<para>
|
|
<link linkend="ref.mysql">MySQL</link> is supported with the only
|
|
change being that MySQL support is no longer enabled by
|
|
<emphasis>default</emphasis> in PHP 5. This essentially means that
|
|
PHP doesn't include the <option role="configure">--with-mysql</option>
|
|
option in the <link linkend="configuration">configure</link> line so
|
|
that you must now manually do this when compiling PHP. Windows users will
|
|
edit &php.ini; and enable the <filename>php_mysql.dll</filename> DLL as
|
|
in PHP 4 no such DLL existed, it was simply built into your Windows
|
|
PHP binaries.
|
|
</para>
|
|
<para>
|
|
Also, the MySQL client libraries are no longer bundled with PHP. More
|
|
details on this topic are covered in
|
|
<link linkend="faq.databases.mysql.php5">the following FAQ</link> and
|
|
be sure to read the <link linkend="ref.mysql">MySQL section</link>
|
|
for details on installing MySQL. An example configure line would be
|
|
<option role="configure">--with-mysql=/usr</option> while Windows users
|
|
will need the <filename>libmySQL.dll</filename> available to the system.
|
|
</para>
|
|
</answer>
|
|
</qandaentry>
|
|
|
|
<qandaentry id="faq.migration5.oop">
|
|
<question>
|
|
<para>
|
|
I hear PHP 5 has an entirely new OOP model, will my existing OOP code
|
|
work? Where do I find information on these new OOP features?
|
|
</para>
|
|
</question>
|
|
<answer>
|
|
<para>
|
|
The main change in PHP 5 is to the OOP model as PHP 5 now uses
|
|
the <emphasis>Zend Engine 2.0</emphasis>. The <link
|
|
linkend="ini.zend.ze1-compatibility-mode">
|
|
zend.ze1_compatibility_mode</link> directive enables compatability
|
|
with the Zend Engine 1.0 (PHP 4).
|
|
</para>
|
|
<para>
|
|
The new OOP model is documented in the <link linkend="language.oop5">
|
|
OOP language reference</link> and <link linkend="migration5.oop">OOP
|
|
migration appendix</link> sections.
|
|
</para>
|
|
</answer>
|
|
</qandaentry>
|
|
|
|
<qandaentry id="faq.migration5.changes">
|
|
<question>
|
|
<para>
|
|
So besides the new OOP model, what else has changed in PHP 5? Also, is
|
|
there a PHP 5 specific version of the PHP manual?
|
|
</para>
|
|
</question>
|
|
<answer>
|
|
<para>
|
|
Few other changes exist, see the <link linkend="migration5">migration
|
|
5 appendix</link> for details. There won't be a PHP 5 specific
|
|
version of the manual as the bulk of PHP remains the same.
|
|
</para>
|
|
</answer>
|
|
</qandaentry>
|
|
|
|
</qandaset>
|
|
</chapter>
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:1
|
|
sgml-indent-data:t
|
|
indent-tabs-mode:nil
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"../../manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
-->
|