pmmp / ext-pmmpthread

Fork of https://github.com/krakjoe/pthreads with a revamped API and PHP 8.1+ support
Other
81 stars 17 forks source link

Remove unintuitive object compare behaviour #56

Open dktapps opened 3 years ago

dktapps commented 3 years ago

As described by this test, == between two Threaded objects actually tells whether the two objects are the same underlying Threaded object.

This is no longer useful because we don't form connection chains, so a Threaded object will always be referred to by the same Zend object.

In addition, == is actually expected to recursively compare properties. While this is obviously insanely inefficient, it's what's expected by PHP. This is yet another stroke of krakjoe genius repurposing language features for things they weren't designed for.