On Wed, 2003-10-08 at 10:21, [EMAIL PROTECTED] wrote:
> (Note: this email seems to relate to this list in my opinion, but I
> have been chewed out before when posting such emails)
>
> I am using PHP 4.3.2, and it seems that testing objects for equality
> (with == or ===) causes an internal bug when the objects have recursive
> instance variables. That is, if the objects being tested have a
> variable that is a reference to an object that has a variable that is a
> reference to the first object, then the PHP processor dies. What can be
> done about this? If this needs to be sent to another mailing list,
> please let me know.
Dirty hack -- create a unique ID instance variable for objects via their
constructor. Implement equality check with:
if( $obj1->uid == $obj2->uid )
{
// Same object, yaaaaaaaaaaay!
}
Cheers,
Rob.
--
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php