From d2f58ea7cb6dd1f446c0b3aa96b0db9191cbfa20 Mon Sep 17 00:00:00 2001 From: Torben Wilson Date: Sat, 5 Sep 2009 06:39:01 +0000 Subject: [PATCH] Noted that the values of static class variables and class constants may be accessed as the names of variables in the local scope, but that single-curly-brace syntax will not work with function or method calls or static class variables or class constants. Addresses bug #47369. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@288077 c90b9560-bf6c-de11-be94-00142212c4b1 --- language/types/string.xml | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/language/types/string.xml b/language/types/string.xml index 84c3199686..b377d2ee52 100644 --- a/language/types/string.xml +++ b/language/types/string.xml @@ -649,10 +649,41 @@ echo "I'd like to have another {${ strrev('reeb') }}, hips"; - Functions and method calls inside {$} work since PHP 5. + Functions, method calls, static class variables, and class + constants inside {$} work since PHP + 5. However, the value accessed will be interpreted as the name + of a variable in the scope in which the string is defined. Using + single curly braces ({}) will not work for + accessing the return values of functions or methods or the + values of class constants or static class variables. + + + +]]> + + +