What is the proper name for accessing an object line by line?

I have been looking for quite some time and cannot find what this method is really called.

In the PHP example:

$var->{'property_name'}
+4
source share
1 answer

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

  • A variable variable
  • A variable property
  • A variable function

It is worth noting that curly braces are needed only when you need to eliminate the ambiguity of the expression (remember that the string you use can itself be stored in a variable!)

Etc. This is described in the PHP manual for variable variables .

+4
source

All Articles