Initialize one object with another

http://ideone.com/MoCds5