3v4l.org

run code in 300+ PHP versions simultaneously
<?php $myArray = array( "a", array( "a", "b", array( "a", "b", "c", array( "a", "b", "c", "d", array("the end") ) ) ) ); function manipulate(&$val) { $val .= " appended"; } array_walk_recursive($myArray, 'manipulate', $myArray); var_dump($myArray);

preferences:
13.77 ms | 405 KiB | 5 Q