php-src/ext/standard/tests/strings/bug22224.phpt

42 lines
616 B
Plaintext
Raw Normal View History

--TEST--
Bug #22224 (implode changes object references in array)
--INI--
error_reporting=0
--FILE--
<?php
2006-01-19 21:27:15 +00:00
function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
//ignore all errors
}
2006-01-19 21:27:15 +00:00
set_error_handler('test_error_handler');
class foo {
}
$a = new foo();
$arr = array(0=>&$a, 1=>&$a);
var_dump(implode(",",$arr));
var_dump($arr)
?>
--EXPECTF--
string(13) "Object,Object"
array(2) {
[0]=>
&object(foo)#%d (0) {
}
[1]=>
&object(foo)#%d (0) {
}
}
2005-08-17 07:59:31 +00:00
--UEXPECTF--
unicode(13) "Object,Object"
array(2) {
[0]=>
&object(foo)#%d (0) {
}
[1]=>
&object(foo)#%d (0) {
}
}