1--TEST-- 2get_object_vars() - ensure references are preserved 3--FILE-- 4<?php 5$obj = new stdClass; 6var_dump(get_object_vars($obj)); 7 8$a='original.a'; 9$obj->ref = &$a; 10$obj->val = $a; 11 12$arr = get_object_vars($obj); 13var_dump($arr); 14 15$arr['ref'] = 'changed.ref'; 16$arr['val'] = 'changed.val'; 17 18var_dump($arr, $obj, $a); 19?> 20--EXPECT-- 21array(0) { 22} 23array(2) { 24 ["ref"]=> 25 &string(10) "original.a" 26 ["val"]=> 27 string(10) "original.a" 28} 29array(2) { 30 ["ref"]=> 31 &string(11) "changed.ref" 32 ["val"]=> 33 string(11) "changed.val" 34} 35object(stdClass)#1 (2) { 36 ["ref"]=> 37 &string(11) "changed.ref" 38 ["val"]=> 39 string(10) "original.a" 40} 41string(11) "changed.ref" 42