rewbs
public php v1 · immutable<?php$arr = array('original');function f($x) { // $x is pass by value, so this assignment should not affect global scope. // ... or should it? $x = 'changed';}$r =& $arr[0]; // this line causes f() to behave like a pass-by-reference function.array_walk($arr, 'f');echo $arr[0]; // prints 'changed' ?>