PHP:变量名前面的&是什么意思?

What does a & in front of a variable name mean?

For example &$salary vs. $salary

It passes a reference to the variable so when any variable assigned the reference is edited, the original variable is changed. They are really useful when making functions which update an existing variable. Instead of hard coding which variable is updated, you can simply pass a reference to the function instead.

Example

<?php
    $number = 3;
    $pointer = &$number;  // Sets $pointer to a reference to $number
    echo $number."<br/>"; // Outputs  '3' and a line break
    $pointer = 24;        // Sets $number to 24
    echo $number;         // Outputs '24'
?>

It is used to pass an object by reference.

See this entry in the PHP documentation.

It's a reference, much like in other languages such as C++. There's a section in the documentation about it.