1--TEST--
2Test array_map() function : usage variations - callback pass semantics
3--FILE--
4<?php
5/*
6 * Test array_map() with a pass-by-value callback forced to behave as a pass-by-reference function.
7 */
8
9$arr1 = array('original.0', 'original.1');
10$arr2 = array('original.0', 'original.1');
11
12function callback($a) {
13   $a = "changed";
14}
15
16array_map('callback', $arr1);
17var_dump($arr1);
18
19$ref  =& $arr2[0];
20array_map("callback", $arr2);
21var_dump($arr2);
22?>
23--EXPECT--
24array(2) {
25  [0]=>
26  string(10) "original.0"
27  [1]=>
28  string(10) "original.1"
29}
30array(2) {
31  [0]=>
32  &string(10) "original.0"
33  [1]=>
34  string(10) "original.1"
35}
36