|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2000-08-18 11:44 UTC] waldschrott@php.net
got another one ;) of course this example is *extremely* different from my example and I don?t know how we could handle circular references in ordered and unordered comparisions with ease, but *it should not crash* (taken from zeev) although it?d expect it to... :) $obj->a='1'; $obj->b='2'; $obj2->b='2'; $obj2->a='1'; $obj2->c=&$obj; $obj->c=&$obj2; echo $obj==$obj2; echo $obj===$obj2; PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 06 11:00:01 2025 UTC |
<?php class object1 { var $a; var $b; var $c; } $obj = new object1(); $obj2 = new object1(); $obj->a='1'; $obj->b='2'; $obj2->b='2'; $obj2->a='1'; $obj2->c=&$obj; $obj->c=&$obj2; echo ($obj==$obj2)?1:2; echo ($obj===$obj2)?1:2; ?> still causes a stack overflow error. Perhaps we need to limit the depth the comparison follows too.