php &$

<?php
$a = 10;
$b = &$a;
$a += 10;

echo $a . '和' . $b; # $a is 20 and $b is 10!


<?php
$a = 10;
$b = $a;
$a += 10;
echo $a . '和' . $b; # $a is 20 and $b is 10!

你可能感兴趣的:(php &$)