Copy or Share · Level 6 of 8

& is two tags on one box

Bind $b to $a with &, then pass $a to a function that takes &$list.

<?phpfunction addNine(array &$list): void{    $list[] = 9;}$a = [1, 2];$b = &$a;$b[] = 3;echo 'a: ', implode(',', $a), PHP_EOL;addNine($a);echo 'b: ', implode(',', $b), PHP_EOL;

1. Predict the output

Tap the lines in the order you think they print.

  1. 1…
  2. 2…