Re: Recursive classes ... possible bug?
| From: | mark@cyanox.nl | Date: | Tue, 05 Jun 2007 22:54:02 +0000 |
| Subject: | Re: Recursive classes ... possible bug? | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-30100@lists.php.net to get a copy of this message | ||
Paweł Stradomski wrote:
mark@cyanox.nl wrote:Dear internals, I stumbled upon the following odd error message from PHP which I was not expecting. function test(){Use === (shallow test - returns true iff the variables refer to the same instance) instead of == (deep comparision - member-by-member). Still in theory it should not produce an error.echo $this == $this->c1->c2?'equals':'not equals'; // Somehow this
AFAIK this behaviour was introduced in 5.2 or 5.1 - well, just another BC break. Actually PHP4 also bombs out with the same error so it is afaik not a BC break.