Values & References2 / 16
Up next

Reference variables

<?php
declare(strict_types=1);
// & binds $y as an alias for the same value
$x = 10;
$y = &$x;
$y = 20;
// changing $y changes $x
echo $x, "\n";
What you're solving

& makes a second name an alias