3v4l.org

run code in 300+ PHP versions simultaneously
<?php $fruits = array("d" => "lemon", "a" => "orange", "b" => "banana", "c" => "apple"); function test(&$item, $key) { if($item == 'orange') $item=''; } array_walk($fruits, 'test'); var_dump($fruits);

preferences:
31.04 ms | 402 KiB | 5 Q