php function & symbol [duplicate] - php

This question already has answers here:
Closed 12 years ago.
Possible Duplicate:
What does it mean to start a PHP function with an ampersand?
hi
Why is it that some php functions have a '&' in their signature for example
function &getData()

It returns a reference to a variable.

Related

Why a function starts with # in php ? like #unpack(xxx)? [duplicate]

This question already has answers here:
What is the use of the # symbol in PHP?
(11 answers)
Closed 7 years ago.
$block_header = #unpack('Sc_size/Su_size/Lchecksum', fread($this->fp, 8));
What does this mean ?
PHP Error Control Operators.
it avoids showing the error returned by the function. more info in the link:
http://www.php.net/manual/en/language.operators.errorcontrol.php

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.

PHP difference between #header() and header() function [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Reference - What does this symbol mean in PHP?
What's the difference between calling #header() and header() function in PHP ?
# suppresses errors:
http://php.net/manual/en/language.operators.errorcontrol.php
generally, you don't want to do that

What's "&" in front of function names? [duplicate]

This question already has answers here:
Closed 11 years ago.
Possible Duplicates:
What does it mean to start a PHP function with an ampersand?
Reference - What does this symbol mean in PHP?
What does this signature mean(&) in PHP?
What's up with the & in front of function names? What does it do?
function &fname(){
}

An Ampersand (&) before a function means? [duplicate]

This question already has answers here:
What does it mean to start a PHP function with an ampersand?
(3 answers)
Closed 7 years ago.
I know & is used to create references.
But I wonder what having a & before a function name means:
function &DB($params = '', $active_record_override = FALSE) { // code }
It returns the result by reference. See the manual entry for it here.

Categories