3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = ['a' => ['f' => 1], 'b' => ['f' => 2], 'c' => ['f' => 3]]; foreach ($a as &$i) { $i['s'] = $i['f']; } foreach ($a as $i) {} var_dump($a);

preferences:
39.81 ms | 402 KiB | 5 Q