Objects and Associate Arrays
This section provides a quick description of access object properties using the associate array formats object_name['property_name']. A tutorial example is provided on how to use objects as associate arrays.
Now you know how to refer to a method property or a method in two ways:
Here is a tutorial example on how to access object's properties and methods in the format of an associate arrays:
If you run this tutorial example, you will see the following output, which confirms my understanding that the dot (.) operator and associate array element operator () are interchangeable.
The output also shows that as an object property, the value of a method is the function definition.
Table of Contents