What is the name of this operator: “->" in php? [duplicate] - php

This question already has answers here:
What is the "->" PHP operator called? [closed]
(15 answers)
Closed 9 years ago.
i am php programmer but i don't know name of this operator
->
this operator use in OOP in php.
for example
$this->get();

It is the object operator (known as T_OBJECT_OPERATOR internally).

The official name is object operator : T_OBJECT_OPERATOR.
Generally called " arrow ".

Related

-> What does this mean in php? $blabla->blabla [duplicate]

This question already has answers here:
Where do we use the object operator "->" in PHP?
(6 answers)
Closed 3 years ago.
$blabla->blab, just wondering what this means something to do with an object going into another?
Sorry for being a bit vague .
The arrow-like symbol has nothing to do with "an object going into another".
The syntax $blabla->blab means a call to attribute $blab in the object $blabla.
The syntax $blabla->blab() means a call to method blab() in the object $blabla.
Please read the Basics in PHP documentations.

Triple equals in return php [duplicate]

This question already has answers here:
Reference Guide: What does this symbol mean in PHP? (PHP Syntax)
(24 answers)
What does "===" mean? [duplicate]
(10 answers)
Closed 3 years ago.
I saw the line below in a class method :
return $return === 1;
What's the meaning of this ? As "===" is a comparaison operator, what would be the expected behavior of using this operator directly in a return ? Return only if 1 ?
Thanks

What is the difference between in_array() and #in_array() in php? [duplicate]

This question already has answers here:
# symbol before php function [duplicate]
(3 answers)
What is the use of the # symbol in PHP?
(11 answers)
Reference Guide: What does this symbol mean in PHP? (PHP Syntax)
(24 answers)
Closed 4 years ago.
can you please help i just want to know why we use #in_array function.
$name = array("ravi", "ram", "rani", 87);
if (in_array("ravi", $name, TRUE)){
}
if (#in_array("ravi", $name, TRUE)){
}
The "#" symbol turn off the errors. It is not a good idea to use it.
PHP Error Control Operators
PHP supports one error control operator:
the at sign (#
http://php.net/manual/en/language.operators.errorcontrol.php

Meaning of '??' operator in php [duplicate]

This question already has answers here:
Reference Guide: What does this symbol mean in PHP? (PHP Syntax)
(24 answers)
Closed 4 years ago.
what is the meaning of '??' operator in php?
I've seen someone using it like this. I've searched many results in google. But didn't found any solution.
$this->variable = $arg['value'] ?? NULL
?? is the new (since PHP 7) NULL coalescing operator. If the first argument is set and is not null it is returned, otherwise, the second argument is returned.

What does -> mean in the context of this function call? [duplicate]

This question already has answers here:
Reference Guide: What does this symbol mean in PHP? (PHP Syntax)
(24 answers)
What does "->" mean/refer to in PHP? [duplicate]
(12 answers)
Closed 9 years ago.
$title = l(
$comment->subject,
comment_node_url(),
array('fragment' => "comment-$comment->cid")
);
Ok, so $title is the l() function, and from what I'm reading, I am passing the $comment->subject argument to l() - is that correct?
What does $comment->subject mean? I'm looking all over and not understanding what it means. Is it an operator of some sort?
Sorry if this is a simple question - I just can't find the answer anywhere.
It's just an operate that indicates that "subject" is a property of $comment. You can read a bit more on the PHP manual.

Categories