Hi,
I've started to make use of references for objects and arrays while
putting together a new site framework and am wondering if there is any
sort of debug code that I could put in to my objects to help show if
they are actually copies or references e.g. retrieving memory address
of object or it's internal object id.
For example:
class MyObject {
function getObjectId() { return object_id($this); }
function getMemoryAddress() { return memory_address($this); }
}
Or maybe there is another way at tackling this.
The reason I ask is I'd like to put debug code in to make sure I'm
using references as much as possible and haven't missed &s in places.
I'm not sure if this information is even available in PHP.
Thanks for any advice you can give me,
Steve