faq.migration5.html

来自「php的帮助文档,涉及到PHP的案例和基本语法,以及实际应用内容」· HTML 代码 · 共 136 行

HTML
136
字号
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head>  <title>Migrating from PHP 4 to PHP 5</title>  <meta http-equiv="content-type" content="text/html; charset=UTF-8"> </head> <body><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="faq.languages.html">PHP and other languages</a></div> <div class="next" style="text-align: right; float: right;"><a href="faq.misc.html">Miscellaneous Questions</a></div> <div class="up"><a href="faq.html">FAQ</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div><hr /><div>  <h1>Migrating from PHP 4 to PHP 5</h1>    <p class="para">   This faq section will help you migrate from PHP 4 to PHP 5.  </p>  <div class="qandaset"><ol class="qandaset_questions"><li><a href="#faq.migration5.php45">           Migrating from PHP 4 to PHP 5         </a></li><li><a href="#faq.migration5.mysql">           Does MySQL work in PHP 5?  It seemed to have disappeared.         </a></li><li><a href="#faq.migration5.oop">           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?          </a></li><li><a href="#faq.migration5.changes">           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?         </a></li></ol>   <dl>    <dt><strong>     <p class="para">      Migrating from PHP 4 to PHP 5     </p>    </strong></dt>    <dd><a name="faq.migration5.php45"></a>     <p class="para">      Although PHP 5 offers many new features, it&#039;s designed to be as      compatible with earlier versions of PHP as possible with little      functionality being broken in the process.     </p>     <p class="para">      Be sure to read the appropriate <a href="migration5.html" class="link">PHP 5      migration appendix</a> of this manual as it contains even more      information on the topic of migrating to PHP 5.     </p>    </dd>   </dl>      <dl>    <dt><strong>     <p class="para">      Does MySQL work in PHP 5?  It seemed to have disappeared.     </p>    </strong></dt>    <dd><a name="faq.migration5.mysql"></a>     <p class="para">      <a href="ref.mysql.html" class="link">MySQL</a> is supported with the only      change being that MySQL support is no longer enabled by       <em class="emphasis">default</em> in PHP 5.  This essentially means that      PHP doesn&#039;t include the <span class="option">--with-mysql</span>      option in the <a href="configuration.html" class="link">configure</a> line so       that you must now manually do this when compiling PHP. Windows users will       edit <var class="filename">php.ini</var> and enable the <var class="filename">php_mysql.dll</var> DLL as      in PHP 4 no such DLL existed, it was simply built into your Windows      PHP binaries.     </p>     <p class="para">      Also, the MySQL client libraries are no longer bundled with PHP.  More      details on this topic are covered in       <a href="faq.databases.html#faq.databases.mysql.php5" class="link">the following FAQ</a> and      be sure to read the <a href="ref.mysql.html" class="link">MySQL section</a>      for details on installing MySQL.  An example configure line would be       <span class="option">--with-mysql=/usr</span> while Windows users      will need the <var class="filename">libmySQL.dll</var> available to the system.     </p>    </dd>   </dl>   <dl>    <dt><strong>     <p class="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?      </p>    </strong></dt>    <dd><a name="faq.migration5.oop"></a>     <p class="para">      The main change in PHP 5 is to the OOP model as PHP 5 now uses      the <em class="emphasis">Zend Engine 2.0</em>.  The <a href="ini.core.html#ini.zend.ze1-compatibility-mode" class="link">      zend.ze1_compatibility_mode</a> directive enables compatability      with the Zend Engine 1.0 (PHP 4).     </p>     <p class="para">      The new OOP model is documented in the <a href="language.oop5.html" class="link">      OOP language reference</a> and <a href="migration5.oop.html" class="link">OOP      migration appendix</a> sections.     </p>    </dd>   </dl>      <dl>    <dt><strong>     <p class="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?     </p>    </strong></dt>    <dd><a name="faq.migration5.changes"></a>     <p class="para">      Few other changes exist, see the <a href="migration5.html" class="link">migration      5 appendix</a> for details.  There won&#039;t be a PHP 5 specific      version of the manual as the bulk of PHP remains the same.     </p>    </dd>   </dl>     </div> </div><hr /><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="faq.languages.html">PHP and other languages</a></div> <div class="next" style="text-align: right; float: right;"><a href="faq.misc.html">Miscellaneous Questions</a></div> <div class="up"><a href="faq.html">FAQ</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div></body></html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?