Don't think that using references will lower your RAM usage
Objects are always copied by reference in PHP 5, which means that copying even the most complex object is instantaneous and essentially free in terms of memory usage. Furthermore, PHP makes extensive use of "copy-on-write", which means taking ten copies of the same array is also free, because they all point to the same object. It's called "copy-on-write" because the minute one of the arrays change from the others, a full copy is made so the change is kept separate.
Copyright 2012 Future Publishing Limited (company
registered number 2008885), a company registered
in England and Wales whose registered office is at