0

PHP WHAT DOES -> MEAN

What does the operator -> mean in php in simple words. Can you give me an example of what it means PLEASE

15th Apr 2018, 10:10 PM
Someone Else
Someone Else - avatar
4 Respostas
+ 3
JS uses dot (.) notation to access methods and properties. for ex- var obj = new MyObject(); obj.thisProperty = 'Fred'; // setting a property of obj object obj.getProperty(); // calling method of obj object
16th Apr 2018, 3:59 AM
Vikash Pal
Vikash Pal - avatar
0
is used in object scope to access methods and properties of an object. It’s meaning is to say that what is on the right of the operator is a member of the object instantiated into the variable on the left side of the operator.
15th Apr 2018, 10:34 PM
Wally
Wally - avatar
0
example: // Create a new instance of MyObject into $obj $obj = new MyObject(); // Set a property in the $obj object called thisProperty $obj->thisProperty = 'Fred'; // Call a method of the $obj object named getProperty $obj->getProperty();
15th Apr 2018, 10:36 PM
Wally
Wally - avatar
0
What would it be in JavaScript because I have used JavaScript a lot and I have never once seen it in there. Does JavaScript have an alternative to it or what.
15th Apr 2018, 10:49 PM
Someone Else
Someone Else - avatar