-> Access Operator

The -> (aka small arrow) access operator is used to get or set an object’s attributes.


This example show the -> access operator being used to set and get a properties values:

Save & refresh browser:

Using the -> access operator to set and get an object's properties

The $myBike object's single property, $make, has been assigned a value of: Ducati

Leave a Reply