nlopess Fri Jan 30 18:14:46 2004 EDT
Modified files:
/phpdoc/en/appendices migration5.xml
Log:
added backward incompatible changes. Missing some examples for clarification now
http://cvs.php.net/diff.php/phpdoc/en/appendices/migration5.xml?r1=1.1&r2=1.2&ty=u
Index: phpdoc/en/appendices/migration5.xml
diff -u phpdoc/en/appendices/migration5.xml:1.1 phpdoc/en/appendices/migration5.xml:1.2
--- phpdoc/en/appendices/migration5.xml:1.1 Fri Jan 30 12:19:06 2004
+++ phpdoc/en/appendices/migration5.xml Fri Jan 30 18:14:46 2004
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.1 $ -->
+<!-- $Revision: 1.2 $ -->
<appendix id="migration5">
<title>Migrating from PHP 4 to PHP 5</title>
@@ -20,9 +20,54 @@
<section id="migration5.incompatible">
<title>Backward Incompatible Changes</title>
<para>
- Although most existing PHP 4 code should work without changes, you shoud
- pay attention to this backward imcompatible changes:
- </para>
+ Although most existing PHP 4 code should work without changes, you should
+ pay attention to this backward imcompatible changes:
+ </para>
+ <itemizedlist>
+ <listitem><simpara>
+ <function>strrpos</function> and <function>strripos</function> now use
+ the entire string as a needle.
+ </simpara></listitem>
+ <listitem><simpara>
+ Ilegal use of string offsets causes <constant>E_ERROR</constant> instead
+ of <constant>E_WARNING</constant>.
+ </simpara></listitem>
+ <listitem><simpara>
+ <function>array_merge</function> was changed to accept only arrays. If a
+ non-array variable is passed, a <constant>E_WARNING</constant> will be
+ thrown for every such parameter. Be careful because your code may start
+ emitting <constant>E_WARNING</constant> out of the blue.
+ </simpara></listitem>
+ <listitem><simpara>
+ PATH_TRANSLATED server variable is no longer set implicitly under
+ Apache2 SAPI in contrast to the situation in PHP 4, where it is set to
+ the same value as the SCRIPT_FILENAME server variable when it is not
+ populated by Apache. This change was made to comply with the <ulink
+ url="&url.cgispecs;">CGI specification</ulink>. Please refer to <ulink
+ url="&url.php.bugs;23610">bug #23610</ulink> for further information.
+ </simpara></listitem>
+ <listitem><simpara>
+ The <constant>T_ML_CONSTANT</constant> constant is no longer defined by
+ the <link linkend="ref.tokenizer">Tokenizer</link> extension. If
+ error_reporting is set to <constant>E_ALL</constant>, PHP will generate a
+ notice. Instead of <constant>T_ML_CONSTANT</constant> for /* */ the
+ <constant>T_COMMENT</constant> constant is used, thus both // and /* */
+ are resolved as the <constant>T_COMMENT</constant> constant. However the
+ PHPDoc style comments /** */ ,which starting PHP5 are parsed by PHP, are
+ recongnized as <constant>T_DOC_COMMENT</constant>.
+ </simpara></listitem>
+ <listitem><simpara>
+ $_SERVER should be populated with argc and argv if variables_order
+ includes "S". If you have specifically configured your system to not
+ create $_SERVER, then of course it shouldn't be there. The change was to
+ always make argc and argv available in the CLI version regardless of the
+ variables_order setting. As in, the CLI version will now always populate
+ the global $argc and $argv variables.
+ </simpara></listitem>
+ <listitem><simpara>
+ Classes must be declared before used.
+ </simpara></listitem>
+ </itemizedlist>
</section>
</appendix>