philip Sat Aug 14 01:54:59 2004 EDT
Modified files:
/phpdoc/en/appendices migration5.xml
Log:
Mention the magical constants (__FUNCTION__,__METHOD__,__CLASS__) are also
case-sensitive in PHP 5. (to go along with get_class())
http://cvs.php.net/diff.php/phpdoc/en/appendices/migration5.xml?r1=1.32&r2=1.33&ty=u
Index: phpdoc/en/appendices/migration5.xml
diff -u phpdoc/en/appendices/migration5.xml:1.32
phpdoc/en/appendices/migration5.xml:1.33
--- phpdoc/en/appendices/migration5.xml:1.32 Tue Aug 10 12:30:13 2004
+++ phpdoc/en/appendices/migration5.xml Sat Aug 14 01:54:58 2004
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.32 $ -->
+<!-- $Revision: 1.33 $ -->
<appendix id="migration5">
<title>Migrating from PHP 4 to PHP 5</title>
@@ -92,11 +92,19 @@
</listitem>
<listitem>
<simpara>
- <function>get_class</function> starting PHP 5 returns the name of the
- class as it was declared which may lead to problems in older scripts
- that rely on the previous behaviour (the class name was lowercased).
- A possible solution is to search for <function>get_class</function> in
- all your scripts and use <function>strtolower</function>.
+ <function>get_class</function> now returns the name of the class as it
+ was declared (case-sensitive) which may lead to problems in older scripts
+ that rely on the previous behaviour (the class name was always returned
+ lowercased). A possible solution is to search for
+ <function>get_class</function> in all your scripts and use
+ <function>strtolower</function>.
+ </simpara>
+ <simpara>
+ This case sensitivity change also applies to the
+ <link linkend="language.constants.predefined">magical predefined
+ constants</link> <constant>__CLASS__</constant>,
+ <constant>__METHOD__</constant>, and <constant>__FUNCTION__</constant>.
+ The values are returned exactly as they're declared (case-sensitive).
</simpara>
</listitem>
<listitem>