A
A
Alexander2015-12-11 14:20:55
PHP
Alexander, 2015-12-11 14:20:55

What does the symbol & mean in a variable to a function?

Friends, what does the "&" symbol show before a variable in a function?

function dodo(&$comments) {

}

Thanks in advance.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Saboteur, 2015-12-11
@up_sweep

php.net/manual/en/language.references.whatdo.php
php.net/manual/en/language.references.pass.php

M
Michael, 2015-12-11
@Madfisht3

Passing a reference to a variable. The function works with the data passed to it directly, and not with a copy.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question