What is the proper name for accessing an object property by string?

oop, php

Solution

Depending on what you are accessing it will be called...

- A `variable variable`

- A `variable property`

- A `variable function`

It is worth noting that the curly-braces are only needed when you need to disambiguate an expression (bear in mind the string you use may itself be stored in a variable!)

And so on. This is documented in the PHP manual for variable variables.

Problem

I've been searching for quite a while and cannot find what this method is actually called. In PHP example: ``` $var->{'property_name'} ```

Original source