1--TEST--
2Bug #22224 (implode changes object references in array)
3--INI--
4error_reporting=0
5--FILE--
6<?php
7class foo
8{
9	function __toString()
10	{
11		return "Object";
12	}
13}
14
15
16$a = new foo();
17
18$arr = array(0=>&$a, 1=>&$a);
19var_dump(implode(",",$arr));
20var_dump($arr)
21?>
22--EXPECTF--
23string(13) "Object,Object"
24array(2) {
25  [0]=>
26  &object(foo)#%d (0) {
27  }
28  [1]=>
29  &object(foo)#%d (0) {
30  }
31}
32