vrana Wed Jul 21 05:05:13 2004 EDT
Modified files:
/phpdoc/en/language control-structures.xml
/phpdoc/en/appendices migration5.xml
Log:
Case sensitivity of include_once and require_once (thanks to Michele Locati)
http://cvs.php.net/diff.php/phpdoc/en/language/control-structures.xml?r1=1.94&r2=1.95&ty=u
Index: phpdoc/en/language/control-structures.xml
diff -u phpdoc/en/language/control-structures.xml:1.94
phpdoc/en/language/control-structures.xml:1.95
--- phpdoc/en/language/control-structures.xml:1.94 Fri Jul 9 12:06:48 2004
+++ phpdoc/en/language/control-structures.xml Wed Jul 21 05:05:12 2004
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.94 $ -->
+<!-- $Revision: 1.95 $ -->
<chapter id="language.control-structures">
<title>Control Structures</title>
@@ -1526,11 +1526,14 @@
<![CDATA[
<?php
require_once("a.php"); // this will include a.php
-require_once("A.php"); // this will include a.php again on Windows!
+require_once("A.php"); // this will include a.php again on Windows! (PHP 4 only)
?>
]]>
</programlisting>
</example>
+ This behaviour changed in PHP 5 - the path is normalized first so that
+ <filename>C:\PROGRA~1\A.php</filename> is realized the same as
+ <filename>C:\Program Files\a.php</filename> and the file is required just once.
</para>
</note>
</para>
@@ -1586,11 +1589,14 @@
<![CDATA[
<?php
include_once("a.php"); // this will include a.php
-include_once("A.php"); // this will include a.php again on Windows!
+include_once("A.php"); // this will include a.php again on Windows! (PHP 4 only)
?>
]]>
</programlisting>
</example>
+ This behaviour changed in PHP 5 - the path is normalized first so that
+ <filename>C:\PROGRA~1\A.php</filename> is realized the same as
+ <filename>C:\Program Files\a.php</filename> and the file is included just once.
</para>
</note>
</para>
http://cvs.php.net/diff.php/phpdoc/en/appendices/migration5.xml?r1=1.24&r2=1.25&ty=u
Index: phpdoc/en/appendices/migration5.xml
diff -u phpdoc/en/appendices/migration5.xml:1.24
phpdoc/en/appendices/migration5.xml:1.25
--- phpdoc/en/appendices/migration5.xml:1.24 Mon Jul 19 10:28:16 2004
+++ phpdoc/en/appendices/migration5.xml Wed Jul 21 05:05:12 2004
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.24 $ -->
+<!-- $Revision: 1.25 $ -->
<appendix id="migration5">
<title>Migrating from PHP 4 to PHP 5</title>
@@ -102,9 +102,16 @@
</listitem>
<listitem>
<simpara>
- <function>ip2long</function> now returns FALSE when an invalid IP
+ <function>ip2long</function> now returns &false; when an invalid IP
address is passed as argument to the function, and no longer
<literal>-1</literal>.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ <function>include_once</function> and <function>require_once</function>
+ first normalize the path of included file on Windows so that including
+ A.php and a.php include the file just once.
</simpara>
</listitem>
</itemizedlist>