sebastianbergmann/phpunit — pull request #697 by kherge (2012-10-18 22:14:52+00:00)
Title: Improving object comparison performance in PHP 5.2 and greater

This change **is** backwards compatible.

I found that when comparing very large objects using `assertSame()`, such as those returned by [Doctrine's](http://doctrine-project.org/) entity manager, the tests would either take a very long time to complete, or cause a segmentation fault.

To work around this, I modified the `IsIdentical` constraint to use `spl_object_hash()` for object only comparisons. This change greatly reduced the amount of time it took to compare objects, and avoided the segmentation faults altogether.