From 039eecbb4e194760834dbf05c5c2bfb662e6e2ed Mon Sep 17 00:00:00 2001 From: Philip Olson Date: Sat, 14 Aug 2004 05:54:58 +0000 Subject: [PATCH] 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 --- appendices/migration5.xml | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/appendices/migration5.xml b/appendices/migration5.xml index 7aa99eabf6..519f234138 100755 --- a/appendices/migration5.xml +++ b/appendices/migration5.xml @@ -1,5 +1,5 @@ - + Migrating from PHP 4 to PHP 5 @@ -92,11 +92,19 @@ - get_class 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 get_class in - all your scripts and use strtolower. + get_class 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 + get_class in all your scripts and use + strtolower. + + + This case sensitivity change also applies to the + magical predefined + constants __CLASS__, + __METHOD__, and __FUNCTION__. + The values are returned exactly as they're declared (case-sensitive).