Re: Unique Object Instance ID..?
| From: | Nathan Nobbe | Date: | Sun, 11 Jan 2009 01:42:01 +0000 |
| Subject: | Re: Unique Object Instance ID..? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-285999@lists.php.net to get a copy of this message | ||
On Sat, Jan 10, 2009 at 4:31 PM, Nathan Rixham <nrixham@gmail.com> wrote:
> Evening All,
>
> Not too often I ask a question here, but here goes;
>
> I'm making an "Object" class which all of my other classes extend, and I
> need each instance to have it's own unique id, seemed simple but it's harder
> than I thought (the difficulty is when it comes to deciding the syntax).
checkout spl_object_hash()
http://php.net/function.spl_object_hash
-nathan