1--TEST-- 2GH-13178: Unsetting last offset variation with hashed array 3--FILE-- 4<?php 5 6$data = ['foo' => 'foo', 'bar' => 'bar', 'baz' => 'baz']; 7 8foreach ($data as $key => &$value) { 9 var_dump($value); 10 if ($value === 'baz') { 11 unset($data['bar']); 12 unset($data['baz']); 13 $data['qux'] = 'qux'; 14 $data['quux'] = 'quux'; 15 } 16} 17 18?> 19--EXPECT-- 20string(3) "foo" 21string(3) "bar" 22string(3) "baz" 23string(3) "qux" 24string(4) "quux" 25