Re: [PHP-DEV] Re: Arrays which have properties of sets

2012-10-07 Thread Sherif Ramadan
On Sun, Oct 7, 2012 at 10:00 PM, Rasmus Schultz wrote: > looks like you're right - spl_object_hash() does in deed work... I > guess I was mislead by some of the notes people made in the > documentation... perhaps these should be moderated, and the > documentation should be update to clear up some

Re: [PHP-DEV] Re: Arrays which have properties of sets

2012-10-07 Thread Rasmus Schultz
looks like you're right - spl_object_hash() does in deed work... I guess I was mislead by some of the notes people made in the documentation... perhaps these should be moderated, and the documentation should be update to clear up some of the mystery and confusion that seems to surround this functio

Re: [PHP-DEV] Re: Arrays which have properties of sets

2012-10-07 Thread Sherif Ramadan
On Sun, Oct 7, 2012 at 7:12 PM, Rasmus Schultz wrote: > the manual states, "The implementation in SplObjectStorage returns the > same value as spl_object_hash()" - so I don't know how this would > really work any better than a custom implementation. > > perhaps safer would be to simply implement a

Re: [PHP-DEV] Re: Arrays which have properties of sets

2012-10-07 Thread Sherif Ramadan
On Sun, Oct 7, 2012 at 7:07 PM, Rasmus Schultz wrote: > Yeah, on that note - I've never understood what use this function is, > as it reuses object IDs... it will return the same hash for two > different objects during the same script execution - so it's unusable > as far as getting unique keys fo

Re: [PHP-DEV] PHP books Recommendations please!!

2012-10-07 Thread Sherif Ramadan
On Sat, Oct 6, 2012 at 8:03 PM, Good Guy wrote: > > I consider myself to be a newbie and wish to learn PHP insiode out. Do you > expert guys have any recommendations for me of books I should consider for > my book shelf? > > I have identified these books but not sure if they will give me enouigh

Re: [PHP-DEV] Re: Arrays which have properties of sets

2012-10-07 Thread Rasmus Schultz
the manual states, "The implementation in SplObjectStorage returns the same value as spl_object_hash()" - so I don't know how this would really work any better than a custom implementation. perhaps safer would be to simply implement a collection-type that requires the classes of elements in the co

Re: [PHP-DEV] Re: Arrays which have properties of sets

2012-10-07 Thread Rasmus Schultz
Yeah, on that note - I've never understood what use this function is, as it reuses object IDs... it will return the same hash for two different objects during the same script execution - so it's unusable as far as getting unique keys for objects... and I don't know what else you could really use it

RE: [PHP-DEV] Re: Arrays which have properties of sets

2012-10-07 Thread Jared Williams
> -Original Message- > From: Rasmus Schultz [mailto:ras...@mindplay.dk] > Sent: 07 October 2012 02:10 > To: internals@lists.php.net > Subject: [PHP-DEV] Re: Arrays which have properties of sets > > First off, let me say - as you pointed out, when the values > are unique, they are best

Re: [PHP-DEV] Re: Arrays which have properties of sets

2012-10-07 Thread Pierre Joye
On Oct 7, 2012 3:10 AM, "Rasmus Schultz" wrote: > > Since I was the one who started this discussion, I'd like to reply to > some of these points. > > First off, let me say - as you pointed out, when the values are > unique, they are best represented > as keys... however, this of course applies onl