diff --git a/language/types/string.xml b/language/types/string.xml
index 594bd2ae0a..f9e6c4f79f 100644
--- a/language/types/string.xml
+++ b/language/types/string.xml
@@ -646,6 +646,34 @@ echo "I'd like to have another {${ strrev('reeb') }}, hips";
-->
+
+
+ It is also possible to access class properties using variables
+ within strings using this syntax.
+
+
+
+
+$bar}\n";
+echo "{$foo->$baz[1]}\n";
+?>
+]]>
+
+ &example.outputs;
+
+I am bar.
+I am bar.
+
+
diff --git a/language/variables.xml b/language/variables.xml
index 84a7768ff4..257ce17ef5 100644
--- a/language/variables.xml
+++ b/language/variables.xml
@@ -721,9 +721,46 @@ echo "$a $hello";
wanted $$a as the variable and then the [1]
index from that variable. The syntax for resolving this ambiguity
is: ${$a[1]} for the first case and
- ${$a}[1] for the second.
+ ${$a}[1] for the second.
-
+
+
+ Class properties may also be accessed using variable property
+ names. The variable property name will be resolved within the
+ scope from which the call is made. For instance, if you have an
+ expression such as $foo->$bar, then the local
+ scope will be examined for $bar and its value
+ will be used as the name of the property
+ of $foo. This is also true
+ if $bar is an array access.
+
+
+
+
+ Variable function example
+
+$bar . "\n";
+echo $foo->$baz[1] . "\n";
+?>
+]]>
+
+ &example.outputs;
+
+I am bar.
+I am bar.
+
+
+
+
Please note that variable variables cannot be used with PHP's