From:             randy at rcs-comp dot com
Operating system: Win XP Pro
PHP version:      5CVS-2006-06-22 (snap)
PHP Bug Type:     *General Issues
Bug description:  $obj != null is incorrectly evaluated

Description:
------------
When evaluating an instantiated object with "!=" the result is incorreclty
returned as false;

Reproduce code:
---------------
echo phpversion();
class foo {
    var $test;
}

$obj = new foo();

if( $obj != null ) {
    echo "\n\ncorrect";
} else {
    echo "\n\nnot correct";
}

Expected result:
----------------
D:\tmp>"c:\Program Files\PHP514\php.exe" obj_null.php
5.1.4

correct

Actual result:
--------------
D:\tmp>php obj_null.php
5.2.0-dev

not correct

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

Reply via email to