mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Mention the magical constants (__FUNCTION__,__METHOD__,__CLASS__) are also
case-sensitive in PHP 5. (to go along with get_class()) git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@166363 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
446d17a45c
commit
039eecbb4e
1 changed files with 14 additions and 6 deletions
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue