3v4l.org

run code in 200+ PHP versions simultaneously
<?php $arr = [1 => 1, 3 => 3]; // [1 => 1, 2 => 3] will print both keys foreach($arr as $key => &$val) { // without & will print both keys echo "See key {$key}\n"; //$arr[0] = 0; // without this line will print both keys unset($arr[0]); }
based on 8Oi0k
Output for 5.6.38 - 7.4.0
See key 1 See key 3