From:             marcus at lastcraft dot com
Operating system: Linux
PHP version:      5.0.1
PHP Bug Type:     Class/Object related
Bug description:  Comparison of class with recursive references causes fatal

Description:
------------
Hi...

The script below causes a fatal error. This is just the simplest example I
could find of a whole class of these problems. Makes comparing any object
problematical.

yours, Marcus

Reproduce code:
---------------
<?php
    class Recursive {
        private $me;

        function __construct() {
            $this->me = $this;
        }
    }

    new Recursive() != new Recursive();
?>

Expected result:
----------------
Nothing as the comparison is not output.

Actual result:
--------------
Fatal error with nesting too deep.

-- 
Edit bug report at http://bugs.php.net/?id=31449&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=31449&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=31449&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=31449&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=31449&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=31449&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=31449&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=31449&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=31449&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=31449&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=31449&r=notwrong
Not enough info:             
http://bugs.php.net/fix.php?id=31449&r=notenoughinfo
Submitted twice:             
http://bugs.php.net/fix.php?id=31449&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=31449&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=31449&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=31449&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=31449&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=31449&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=31449&r=float
No Zend Extensions:          http://bugs.php.net/fix.php?id=31449&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=31449&r=mysqlcfg

Reply via email to