3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = new ArrayObject([1, 2, 3]); foreach ($a as $key => &$value) { $value = $value + 10; } unset($value); var_dump($a);

preferences:
16.6 ms | 407 KiB | 5 Q