Copy or Share · Level 1 of 8

Your own box

Assign an array to a second variable, then change the second one.

<?php$a = [1, 2];$b = $a;$b[] = 3;echo 'a: ', implode(',', $a), PHP_EOL;echo 'b: ', implode(',', $b), PHP_EOL;

1. Predict the output

Tap the lines in the order you think they print.

  1. 1…
  2. 2…