Which operator is used to access property of an object in PHP?
A. .
B. *
C. ->
D. @
Answer: Option C
Solution (By Examveda Team)
This question asks about how you "get into" an object in PHP to grab specific pieces of information, called "properties". Imagine an object like a box, and the properties are the things inside.We need an operator to tell PHP: "Hey, I want to look inside this object and get the property called '____'"
Here's the breakdown of the options:
Option A: . This is used to access properties of classes, not objects. Think of it like a blueprint for making objects.
Option B: * This is for multiplication. It doesn't help us with objects.
Option C: -> This is the winner! The arrow operator (->) is the key to accessing object properties. It's like saying "go inside this object and grab the property I'm pointing at".
Option D: @ This is used for error suppression. It's not for accessing properties.
So the correct answer is Option C: ->
Related Questions on MySQL Miscellaneous
How is communication established with MySQL?
A. SQL
B. Network calls
C. A programming language like C++
D. APIs
Which type of database management system is MySQL?
A. Object-oriented
B. Hierarchical
C. Relational
D. Network

Join The Discussion