After PHP 5.5, foreach with reference in arbitrary array does not generate an error:
foreach ([1, 2, 3, 4] as $key => &$value) {
$value = $value . ' R$';
}
before 5.4, will generate "Cannot create references to elements of a temporary array expression"