mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
new incompatibilities appendix, using info from website
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@39866 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
8a7cc8d608
commit
d13d821b8b
1 changed files with 60 additions and 0 deletions
60
appendices/incompat.xml
Normal file
60
appendices/incompat.xml
Normal file
|
@ -0,0 +1,60 @@
|
|||
<appendix id="incompat">
|
||||
<title>Incompatibilities</title>
|
||||
|
||||
<sect1 id="incompat.php4">
|
||||
<title>Incompatibilities from PHP 3 to PHP 4</title>
|
||||
<itemizedlist>
|
||||
<listitem><simpara>
|
||||
Static variable and class member initializers only accept scalar values (in PHP 3.0 they accepted any valid expression). The impact should be small, since initializers with anything but a simple static value rarely make sense.
|
||||
</simpara></listitem>
|
||||
<listitem><simpara>
|
||||
The scope of break and continue is local to that of an <function>include</function>'d file or an <function>eval</function>'d string. There should be virtually no impact for this incompatibility.
|
||||
</simpara></listitem>
|
||||
<listitem><simpara>
|
||||
A return statement from a <function>require</function>'d file no longer works. It hardly worked in PHP 3.0, so the impact should be fairly small. If you want this functionality - use <function>include</function> instead.
|
||||
</simpara></listitem>
|
||||
<listitem><simpara>
|
||||
<function>unset</function> is no longer a function, but a statement. It was never documented as a function, so the impact here will probably be non existent.
|
||||
</simpara></listitem>
|
||||
<listitem><simpara>
|
||||
The following letter combination is not supported within encapsulated strings: "{$". If you have a string that includes this letter combination, for example, print "{$somevar"; (which printed the letter { and the contents of the variable $somevar in PHP 3.0), it will result in a parse error under Zend. In this case, you would have to change the code to print "\{$somevar"; This incompatability is due to the full variable reference within quoted strings feature added in Zend.
|
||||
</simpara></listitem>
|
||||
<listitem><simpara>
|
||||
The function <function>short_tags</function> no longer works. There is no way to change PHP's short tags behavior in runtime, only by using configuration parameters (.htaccess variables would work well).
|
||||
</simpara></listitem>
|
||||
<listitem><simpara>
|
||||
You can't use PHP 3 dynamic extensions (php3_*.dll on Windows) with PHP 4.
|
||||
</simpara></listitem>
|
||||
<listitem><simpara>
|
||||
The string "0" is now considered empty. This is known to have an effect on phpMyAdmin.
|
||||
</simpara></listitem>
|
||||
<listitem><simpara>
|
||||
In PHP 4, multiple calls to <function>setcookie</function> are performed in the order called, whereas in PHP 3 they were performed in reverse order.
|
||||
</simpara></listitem>
|
||||
<listitem><simpara>
|
||||
<function>unset</function> now breaks the association between a locally scoped variable and one that is globally scoped if the reference is made using the "global" keyword.
|
||||
</simpara></listitem>
|
||||
<listitem><simpara>
|
||||
Associative array subscripts should be quoted. If you fail to quote them, they will be interpreted as constants. This can cause unpredictable results when using keywords such as "NULL" as an unquoted array subscript.
|
||||
</simpara></listitem>
|
||||
</itemizedlist>
|
||||
</sect1>
|
||||
|
||||
</appendix>
|
||||
|
||||
<!-- 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
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
-->
|
Loading…
Reference in a new issue